Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#38 2016-10-05 10:59:52

etc
Developer
Registered: 2010-11-11
Posts: 5,211
Website GitHub

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: 79

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

#40 2017-02-08 23:11:10

etc
Developer
Registered: 2010-11-11
Posts: 5,211
Website GitHub

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

#42 2017-07-01 13:27:37

etc
Developer
Registered: 2010-11-11
Posts: 5,211
Website GitHub

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

#44 2018-07-12 12:16:35

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

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

#46 2018-07-12 13:42:07

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: etc_tree: trees for geeky grandmas

This tips from ADI work as expected with the categories tree.

Now how give a section, and for this section give the articles of this section, listed/ordered in the category tree ?

Maybee give the main category the same name as the section ?

Offline

#47 2018-07-12 15:19:43

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: etc_tree: trees for geeky grandmas

Hi JP

You could try

...
<txp:category title="1" link="1" section='<txp:section />' />
...

or just leave the section attribute out all together… Note that the attribute appears twice in the tip.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#48 2018-07-12 15:33:20

etc
Developer
Registered: 2010-11-11
Posts: 5,211
Website GitHub

Re: etc_tree: trees for geeky grandmas

jpdupont wrote #312991:

I feel that I do not understand the “section” attribute of category_list. —> Does it only display categories related to the section shown?

Nope, it only adds the supplied section to category URL.

You can try this (though no warranty applies): create a recursive catlist form

<txp:category_list children="-1" exclude parent wraptag="" break="">
    <txp:evaluate test="article_custom, output_form" wraptag="li">
        <txp:category />
        <txp:article_custom section="spectacles" category match="Category1" wraptag="ol" break="li">
            <txp:permlink><txp:title/></txp:permlink>
        </txp:article_custom>
        <txp::catlist wraptag="ul" />
    </txp:evaluate>
</txp:category_list>

and call it where needed

<txp::catlist wraptag="ul" />

Offline

Board footer

Powered by FluxBB