Apropos

It is apropos of nothing, of course, and thus all the funnier.

Keywords: hello, welcome, about


Timeline

Weekly Contributions

2022-06-23 19:59:03 — comment on etc_tree

Could you plz help me to have the following format + assign active? Like I’m in contact page:

<ul id="menu" class="main, topnav">
  <li><a href="...">Home</li>
  <li><a href="...">Services
    <ul class="submenu"><a href="...">
      <li><a href="...">Service1</li>
      <li><a href="...">Service2</li>
    </ul>
  </li>
  <li class="active"><a class="current" href="...">Contact</li>
</ul>
2022-06-24 11:03:29 — comment on etc_tree

Hi, etc_tree itself has currently no mean to differentiate between tree levels, so you’d need an extra plugin, like etc_query. This should then work:

<txp:etc_query
    data='<txp:etc_tree id="1" html_id="menu" class="submenu" breakclass=",active" />'
    replace="ul@@class=main, topnav;//a@@rel@data-id@data-type;//li[@class='active']/a@@class=current"
/>

Keywords: history, time, sitemap