XF 2.0 how to add an HTML script tag to every page only for logged in users

XFConvert

Member
Want to add an HTML script tag with some variables in the script, to be on every page of the site, but only for logged in users.

I assume I need to add some conditionals in a template.

Exactly what template and exactly what is the code for the conditional?

Thanks!
 
The conditional for logged in users would be this right here:

HTML:
<xf:if is="$xf.visitor.user_id">
  Show content...
</xf:if>

You can check out the full list of conditionals here in this resource:

https://xenforo.com/community/resources/conditional-statements-for-xenforo-2.5795/

I wouldn't call it a complete list but this is the best we got so far and it still has a good bit of conditionals for you to use. Good luck once again!
 
Back
Top Bottom