Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2019-05-08 12:47:42

etc
Developer
Registered: 2010-11-11
Posts: 3,157
Website

Re: etc_tree: trees for geeky grandmas

Hi ibadullah,

sorry, I’ve somehow zapped your question. I don’t see how etc_tree could create a non-recursive structure (ul/li switched to div/a) that you need here. Actually, mixing sections, categories and articles should be avoided, but if you really need it, I can imagine a way to transform etc_tree output with etc_query.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#62 2019-05-09 04:59:52

ibadullah
New Member
From: Kabul, Afghanistan
Registered: 2017-09-16
Posts: 24

Re: etc_tree: trees for geeky grandmas

Currently I can create menu from different section, categories and articles through etc_tree plugin already.
For example: Home, *About*(Article), *Services*(Section), *News*(Category), *Contact*(Article)
But the structure of bootstrap nav is different which has different extra tags <div> and elements and I couldn’t make them dynamic through etc_tree plugin.

Last edited by ibadullah (2019-05-09 05:08:05)

Offline

#63 2019-06-11 11:13:08

ibadullah
New Member
From: Kabul, Afghanistan
Registered: 2017-09-16
Posts: 24

Re: etc_tree: trees for geeky grandmas

Still, I’m looking a solution for: link
I tried the following structure but didn’t success with to work with the above structure I need.


      <txp:etc_query
        data='<txp:etc_tree id="6" />'
    replace="//ul@@class=navbar-nav mr-auto w-100 justify-content-end;
        //ul/li/ul/..@@class=class-name;
        //ul/li/ul/li/..@@class=class-name;
        //ul/preceding-sibling::a@@data-toggle=dropdown@class=dropdown-toggle"
      />

Offline

#64 2019-06-11 15:09:35

etc
Developer
Registered: 2010-11-11
Posts: 3,157
Website

Re: etc_tree: trees for geeky grandmas

Hello, have you tried to set wraptag and break attributes before transforming the tree:

<txp:etc_tree id="6" wraptag="ul" break="li" />

To help with etc_query, I would need to see the HTML output produced by <txp:etc_tree /> in your case. You can display it with debug="d" attribute of etc_query.


etc_[ query | search | pagination | date | tree | cache ]

Offline

Board footer

Powered by FluxBB