XF 2.2 Parent node id

SeaWolf

Member
Is when i'm in a thread list i can get the node id?
Let say i have a node "Welcome" with id=10
In that "Welcome" node i have some threads (a, b, c)
When i'm in that list of threads, so in the "Welcome" node, how can i get the node id ?
What i want is something like this when i'm in the Welcome node.
<xf.if is{$node.node_id} = 10 and $user = registered (or 1 if registered=1 would be better)>
...do something...
</xf.if>

Thank you for any help !
😀
 
You could use $xf.reply.containerKey for this:

<xf:if is="($xf.reply.containerKey == 'node-###')">

Replace ### with the node id, for example 'node-10'
Working great, thank you!

<xf:if is="{{$xf.visitor.isMemberOf([5,6])}}">
....
<xf:elseif is="($xf.reply.containerKey == 'node-32') || ($xf.reply.containerKey == 'node-29')" />
{{ phrase('read_only') }}
<xf:else />
{{ phrase('no_permission_to_post') }}
</xf:if>
 
Top Bottom