XF 2.3 Page node menu, is-selected - How to?

  • Thread starter Thread starter Deleted member 184953
  • Start date Start date
D

Deleted member 184953

Guest
Regarding this thread : https://xenforo.com/community/threads/is-selected-how-to.223700/
I want to do the same kind of menu but with page nodes, i tried this but it does not work...
HTML:
<a href="/-/podcasts/" class="blockLink {{ $node.node_id == $page.node_id ? 'is-selected' : '' }}">page A</a>
I dumped vars and node_id is available...
I'm surely missing something.

Thanks for any help.
 
Last edited by a moderator:
I manually added the node_id and it works like that:
HTML:
<a href="/-/podcasts/" class="blockLink {{ $page.node_id == 71 ? 'is-selected' : '' }}">{$page.title}</a>

How can i automatically get the node ID?
How can i automatically get the node URL?

If i can get this too variables maybe i will be able to create a loop.
Thanks.
 
I use this for the link:
HTML:
<a href="/-/{$page.node_name}/" class="blockLink {{ $page.node_id == 71 ? 'is-selected' : '' }}">{$page.title}</a>

I need the ID now and have to learn how to create a loop...
Is creating a HTML loop needs PHP?
 
Last edited by a moderator:
Back
Top Bottom