It is loggedIn everywhere now. https://github.com/NodeBB/NodeBB/issues/1900
barisusakli created this issue in NodeBB/NodeBB closed isLoggedIn loggedIn confusion #1900Template conditional <!-- IF x=y --> possible?
-
I don't know if this is possible with the current templating system. How would you go about doing this?
-
I think you just discovered a bug in the title handling.
When visiting this topic directly without involving ajax, the title tag gets corrupted and the HTML looks like this:<title>Template conditional rel="icon" type="image/x-icon" href="/favicon.ico" />
Can't help you on your initial question, though. Sorry.
-
The templating engine is logicless, so the easiest way is to do it on the API... send in
{ myResult: x === y }
and then use
<!-- IF myResult -->
or alternatively you could use helpers
-
@EisFrei the title bug is fixed in https://github.com/NodeBB/NodeBB/commit/7c7be2e0c15a62f054a06d8949b298eee4dc7b39
-
@baris when opening the topic directly, the title now is correct. When opening the topic using ajax the title is html-escaped
<!-- IF...
. -
That should be fixed as well now, thanks.