<xf:if is="{{$xf.visitor.isMemberOf(x)}}">
Show content...
</xf:if>
Is it possible to show content only if page URL equals to something? For example to show the login form only if its the login page (/login/)
I cannot use template = login because the login must be implemented IN the login template.
Unless I create a template modification with a callback which will check in PHP if the page is the login. But it sounds like a bad solution. Or?
<xf:if is="$xf.uri == '/login/'">
Your content
</xf:if>
googletag.pubads().setTargeting('VisitorID', '{$xf.visitor.user_id}'); <-- updated
googletag.pubads().setTargeting('Template', '{$template}'); <-- updated
googletag.pubads().setTargeting('ForumID', '{$forum.node_id}'); <-- same as XF1
googletag.pubads().setTargeting('ParentID', '{$forum.parent_node_id}'); <-- HELP
I've tried a handful of possible options, none successful at returning a value....ANYONE know what this variable is?
{$context.forum.Node.parent_node_id}
work?No value returned there either. hhmmmmDoes{$context.forum.Node.parent_node_id}
work?
No value returned there either. hhmmmm
https://xenforo.com/community/threads/conditional-statements-for-xenforo-2.136639/post-1303326 - answer: noDoes anyone know the Xf2 version of:
$forum.parent_node_id
?
Exactly my issue.I used the following in XF1.5 so Google Ad Manager could pull page codes into GAM for ad targeting. What updates do these need to work? Thank you!
googletag.pubads().setTargeting('VisitorID', '{$visitor.user_id}');
googletag.pubads().setTargeting('Template', '{$contentTemplate}');
googletag.pubads().setTargeting('ForumID', '{$forum.node_id}');
googletag.pubads().setTargeting('ParentID', '{$forum.parent_node_id}');
<xf:if is="{{$user.isMemberOf(51)}}">
and
<xf:if is="{$user.Profile.custom_fields.test}">
and
<xf:if is="$user.is_moderator">
and
<xf:if is="$user.is_admin">
and
<xf:if is="!$user.is_admin">
<xf:if is="{{$user.isMemberOf(x)}}">
ErrorException: Template error: Cannot call method isMemberOf on a non-object (NULL)
src/XF/Template/Templater.php:907
<xf:if is="$user AND {{$user.isMemberOf(x)}}">
code here
</xf:if>
<xf:if is="$forum.node_id != 3">
CONTENT
</xf:if>
We use essential cookies to make this site work, and optional cookies to enhance your experience.