Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-05-02 12:20:50

mori
New Member
Registered: 2019-05-01
Posts: 9

Would these old pull-down menu tutorials work?

Hello,

In another thread I posted someone mentioned that Textpattern has really only one depth.
If I really wanted to have more than one depth (or at least pull down menus), would these old tutorials work?

I read that Textpattern has changed quite a bit, so I’m unsure whether the methods above would work or are the best for the current version.

Apologies for asking something for which Textpattern probably wasn’t intended.

Offline

#2 2019-05-02 12:33:11

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: Would these old pull-down menu tutorials work?

Hehe, me again!

You can fake the effect of greater depth by fashioning your own /section/category/category-name urls or making menus out of tiered category-subcategory combinations but the individual articles will in the end always be of the format /section/article-url-title. There’s no real way around that.

Textpattern.org is currently extremely old and it will be replaced (soon-ish) with a more up-to-date plugin directory. You’ll find more recent tips either here in the forum or on textpattern.tips which has categories such as navigation of textpattern.tips or search for menu on textpattern.tips.

There are so many ways to make a menu structure, so it’s worth thinking about what you want to achieve and what information should show at each level of the menu.

EDIT: The majority of textpattern tags, which you can find at docs.textpattern.com/tags, are very similar to what they were but over the years they have become more powerful and workarounds or special plugins that were used in the past (and many tips from textpattern.org are really old) are not needed anymore.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2019-05-02 22:19:18

mori
New Member
Registered: 2019-05-01
Posts: 9

Re: Would these old pull-down menu tutorials work?

Hello again!

Awesome, thank you! I’ll be looking forward to the new replacement sites.

Offline

#4 2019-05-03 09:48:22

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

Re: Would these old pull-down menu tutorials work?

mori wrote #317861:

In another thread I posted someone mentioned that Textpattern has really only one depth.

This is true for txp-generated URLs, but there is no limitations on content/menu nesting. For example, the categories already have parent/child hierarchy. You can introduce such relations for articles too, via some parent or related custom fields.

If I really wanted to have more than one depth (or at least pull down menus), would these old tutorials work?

Most of them are still working but really outdated. For example, there is no more need for multiple nested forms since txp 4.7 allows for recursive form calls. If you want to output a basic category tree with associated articles, just create the following menu form

<txp:category_list exclude parent children="-1" wraptag="ul" break="li">
    <txp:category link title />
    <txp:article_custom category wraptag="ol" break="li">
        <txp:permlink><txp:title /></txp:permlink>
    </txp:article_custom>
    <txp::menu />
</txp:category_list>

and call <txp::menu />.

Offline

#5 2019-05-04 21:47:30

mori
New Member
Registered: 2019-05-01
Posts: 9

Re: Would these old pull-down menu tutorials work?

thank you! I’ll try it out.

Offline

Board footer

Powered by FluxBB