Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#11 2015-10-07 07:05:20
- etc
- Developer
- Registered: 2010-11-11
- Posts: 3,397
- Website
Re: etc_tree: trees for geeky grandmas
I know nothing about server configuration, sorry. Try to replace the line
$( "#etc-link-list" ).load( "?event=etc_tree #etc-link-list>*", $params, function() {$.fn.etc_link_reset();});
with
$( "#etc-link-list" ).load( "index.php?event=etc_tree #etc-link-list>*", $params, function() {$.fn.etc_link_reset();});
in the plugin code, and check the logs again.
Offline
#12 2015-10-30 14:50:38
- raminrahimi
- Member
- From: India
- Registered: 2013-03-19
- Posts: 243
Re: etc_tree: trees for geeky grandmas
that was server problem, i moved to linux server now it’s fine.
one issue i have in the latest version of etc_tree, when i double click on each left buttons of menu (which shows ID) , the menu will remove !
Offline
#13 2015-12-07 18:53:54
- raminrahimi
- Member
- From: India
- Registered: 2013-03-19
- Posts: 243
Re: etc_tree: trees for geeky grandmas
I’ve more links on my etc_tree around 227 records, now i can’t add new links
when i add new link after clicking Save button, those new link will remove and nothing new append just available those old links.
I don’t know what’s the problem, may be the size of etc_form goes heavy and don’t allow anymore …
Offline
#14 2015-12-07 20:16:43
- etc
- Developer
- Registered: 2010-11-11
- Posts: 3,397
- Website
Re: etc_tree: trees for geeky grandmas
It’s probably related with maximum post size (or this), please try the proposed solutions.
Last edited by etc (2015-12-07 20:18:04)
Offline
#15 2015-12-08 17:37:36
- raminrahimi
- Member
- From: India
- Registered: 2013-03-19
- Posts: 243
Re: etc_tree: trees for geeky grandmas
done ! now works fine thanks :-)
Offline
#16 2015-12-08 18:09:57
- etc
- Developer
- Registered: 2010-11-11
- Posts: 3,397
- Website
Re: etc_tree: trees for geeky grandmas
Glad you have solved it. It’s a temporary solution, I should think of packing the whole tree in one _POST
variable, but have no time atm.
Offline
#17 2016-05-26 06:47:44
- bashirnoori
- Member
- From: Afghanistan
- Registered: 2012-10-02
- Posts: 59
Re: etc_tree: trees for geeky grandmas
how to assign dynamic class for each list which has submenus, example:
<li><a href="...">Home</a></li>
<li class="hasmenu"><a href="...">News</a>
<ul class="submenu">
<li><a href="...">Local</a></li>
<li class="hasmenu2"><a href="...">Global</a>
<ul class="submenu2">
<li><a href="...">Sports</a></li>
<li><a href="...">Plitics</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="...">Contact</a></li>
Offline
#18 2016-05-26 08:42:30
- etc
- Developer
- Registered: 2010-11-11
- Posts: 3,397
- Website
Re: etc_tree: trees for geeky grandmas
Not sure it’s a good idea to use numbers in class names, but you can:
<txp:etc_query
data='<txp:etc_tree id="0" />'
replace="//ul@@class=submenu{##};//li[ul]@@class=hasmenu{##}"
/>
Edit: or this, if you want to assign numbers by levels:
<txp:etc_query
data='<txp:etc_tree id="0" />'
replace="//ul@@class=submenu{count(ancestor::ul)};//li[ul]@@class=hasmenu{count(ancestor::ul)}"
/>
Last edited by etc (2016-05-26 08:54:38)
Offline
#19 2016-05-27 13:10:35
- bashirnoori
- Member
- From: Afghanistan
- Registered: 2012-10-02
- Posts: 59
Re: etc_tree: trees for geeky grandmas
<txp:etc_query
data='<txp:etc_tree id="1" />'
replace='//a[@href="<txp:etc_url />"]@@class=active'
/>
Assigning active class to the current menu works fine,
but if we have nested menus that will assign just to that nested menu, not assign to the top level menu.
e.g. I need like this: if i’m in the Local
page active class should assign for Local & News menus.
<li><a href="...">Home</a></li>
<li><a href="...">About</a>
<li><a class="active" href="...">News</a>
<ul class="submenu">
<li><a class="active" href="...">Local</a></li>
<li><a href="...">Global</a></li>
</ul>
</li>
<li><a href="...">Contact</a></li>
Reason: if don’t assign active class to the top level menus, nested menus are hidden by default and no one know I’m in which page !
Offline
#20 2016-05-27 13:56:11
- etc
- Developer
- Registered: 2010-11-11
- Posts: 3,397
- Website
Re: etc_tree: trees for geeky grandmas
Does this help?
<txp:etc_query
data='<txp:etc_tree id="1" />'
replace='//a[@href="<txp:etc_url />"]@@class=active;
//a[@href="<txp:etc_url />"]/ancestor::ul/preceding-sibling::a[1]@@class=active'
/>
This assumes you always have <a />
link before <ul />
.
Offline