Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#31 2016-08-07 12:18:34
- bashirnoori
- Member

- From: Afghanistan
- Registered: 2012-10-02
- Posts: 86
Re: etc_tree: trees for geeky grandmas
I have another php page for my gallery management (gallery.php)
Now i want to bring this etc_tree menus which i use to txp section to my gallery.php file
is there any solution way to make link txp with my gallery.php file ?
Offline
#32 2016-09-07 09:22:08
- bashirnoori
- Member

- From: Afghanistan
- Registered: 2012-10-02
- Posts: 86
Re: etc_tree: trees for geeky grandmas
I have a news website, having menus: Home, News, Politics, About, Contact
Is it possible when I visit any article of a category, active class should assign for that category ?
example: if I visit an article that belong to News category, so active class should assign for News menu.
Offline
Re: etc_tree: trees for geeky grandmas
If your “categories” are Textpattern categories (one level), you don’t need etc_tree here. Something like this should work:
<txp:category_list categories="home, news, politics, about, contact" wraptag="ul" break="">
<li<txp:if_article_category name='<txp:category />'> class="active"</txp:if_article_category>>
<txp:category title="1" />
<txp:article_custom category='<txp:category />' wraptag="ul" break="li">
<txp:title />
</txp:article_custom>
</li>
</txp:category_list>
Last edited by etc (2016-09-07 11:08:30)
Offline
#34 2016-09-25 05:53:48
- raminrahimi
- Member

- From: India
- Registered: 2013-03-19
- Posts: 278
Re: etc_tree: trees for geeky grandmas
i want to have a duplicate menu links on my website that should list on the dropdown menu list, so
how to to list the menus as the following format:
<option value="http://sitename.com">Home</option>
<option value="http://sitename.com/about">About</option>
<option value="http://sitename.com/contact">Contact</option>
...
Offline
Re: etc_tree: trees for geeky grandmas
raminrahimi wrote #301730:
i want to have a duplicate menu links on my website that should list on the dropdown menu list
If you need to duplicate an existing ul/li/a tree as select/option box, the most straightforward way will be to pass it through etc_query:
<txp:etc_query data='<txp:etc_tree id="1" />' query="ul/li/a" wraptag="select">
<option value="{@href?}">{?}</option>
</txp:etc_query>
But check if you can not do your menus just with section_list by any chance.
Offline
Re: etc_tree: trees for geeky grandmas
etc wrote #301731:
But check if you can not do your menus just with section_list by any chance.
Maybe this would work
<txp:section_list wraptag="" break="">
<option value="/<txp:section />/"><txp:section title="1" /></option>
</txp:section_list>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#37 2016-10-05 09:42:05
- raminrahimi
- Member

- From: India
- Registered: 2013-03-19
- Posts: 278
Re: etc_tree: trees for geeky grandmas
i had the old version of etc_tree to one of my client website, due to having lots of menus that was hard to manage with old version, then i’ve deleted that plugin and installed the latest version v0.1.4
after installation, when i’m enabling the plugin this error come: Sorry, the form could not be submitted. Please try again later.
when i go to extension -> etc_tree again this error appear: Internal error “Table ‘kmonitor.xz9_etc_tree’ doesn’t exist”.
so, right now i’ve lost the etc_tree :-(
Offline
Re: etc_tree: trees for geeky grandmas
Sorry about that, but yes, when you delete etc_tree it deletes all its data. You should have installed the new version over the old one, without deleting it. I’m not sure there is a way to recover etc_tree table now, unless your host has a db backup.
To create a new table, try to disable/enable the plugin again.
Offline
#39 2017-02-06 17:44:23
- bashirnoori
- Member

- From: Afghanistan
- Registered: 2012-10-02
- Posts: 86
Re: etc_tree: trees for geeky grandmas
when i create a list menu, can’t drag another menu to that, if i save then can drag another menu to that list.
it means until doing save, we can’t drag new menu to new listed menu.
Offline
Re: etc_tree: trees for geeky grandmas
bashirnoori wrote #303855:
when i create a list menu, can’t drag another menu to that, if i save then can drag another menu to that list.
Yes, I know, that’s how etc_tree currently works: a new node can be added only to an existing one. That’s not ideal and I will try to change it if etc_tree gets rewritten some day, but can not promise any schedule.
Offline
#41 2017-07-01 10:09:25
- raminrahimi
- Member

- From: India
- Registered: 2013-03-19
- Posts: 278
Re: etc_tree: trees for geeky grandmas
i need to have like this with etc_tree to apply specifc class on the first <ul> and assign a class to those <li> which has submenu (<ul>), like this:
<ul class="mainmenu">
<li><a href="#">Home</a></li>
<li class="has-submenu"><a href="#">Services</a>
<ul>
<li><a href="#">Service 1</a></li>
<li><a href="#">Service 2</a></li>
</ul>
</li>
</ul>
Offline
Re: etc_tree: trees for geeky grandmas
Like this?
<txp:etc_query data='<txp:etc_tree id="0" />'
replace="ul@@class=mainmenu;//li/ul/..@@class=has-submenu"
/>
Offline
#43 2018-07-12 07:49:25
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: etc_tree: trees for geeky grandmas
I am looking to create a category tree, with parents> children, then articles belonging to this category. I want to limit categories and articles to a particular section.
I did a test with adi_cat_menu, everything is fine except that the parent categories are not shown
With etc_tree the tree is present, but I can not limit to a particular section, and in addition to avoid displaying empty sections. Where am I wrong ?
<txp:etc_tree circular="3" wraptag="" break="">
<txp:category_list wraptag="ul" break="li" section="spectacles" parent='<txp:category />' exclude='<txp:category />' children="0">
<txp:category title="1" link="0" />
<txp:article_custom limit="999" category='<txp:category />' section="spectacles" sort="Posted desc" wraptag="ul" break="li">
<txp:permlink>
<txp:title/></txp:permlink>
</txp:article_custom>
<txp:etc_tree />
</txp:category_list>
</txp:etc_tree>
See my test page and below my code with adi_cat_menu :
<txp:section_list wraptag="" break="">
<txp:evaluate test="adi_cat_menu">
<ul>
<li>
Section =
<txp:section title="0" />
<ul>
<txp:adi_cat_menu article_attr='sort="title asc"' section='<txp:section />' section_sensitive="1" link="0" />
</ul>
</li>
</ul>
</txp:evaluate>
</txp:section_list>
Offline
Re: etc_tree: trees for geeky grandmas
Hi JP,
Would this tip be of help?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#45 2018-07-12 13:24:59
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: etc_tree: trees for geeky grandmas
Hi Yannis,
I just tested on my page, and I do not have the expected result. I feel that I do not understand the “section” attribute of category_list. —> Does it only display categories related to the section shown?
Jean-Pol
Offline