Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-02-10 20:00:10

Freeant
Member
Registered: 2012-04-16
Posts: 36

How to make a menu

Perhaps, something like <txp:section_list…

Perhaps instead of pages better use also section

Page (or section) – must also be a link to “page or section”

?

Last edited by Freeant (2015-02-10 21:19:51)

Offline

#2 2015-02-10 21:21:24

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: How to make a menu

The problem with that diagram is that sections don’t belong to pages – they use pages for display purposes.

adi_menu might be able to help. It allows for hierarchies within sections for the purposes of building a menu.

Offline

#3 2015-02-10 21:25:05

Freeant
Member
Registered: 2012-04-16
Posts: 36

Re: How to make a menu

Thx aslsw66.

But…
Is it possible to do without plug-ins.
Perhaps instead of pages better use also section

Last edited by Freeant (2015-02-10 21:27:15)

Offline

#4 2015-02-11 04:23:21

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: How to make a menu

Freeant wrote #288160:

Thx aslsw66.

But…
Is it possible to do without plug-ins.
Perhaps instead of pages better use also section

I think so, especially if you don’t get bound up in a hierarchy.

Sections = Equipment, Hardware.
Categories = Drills, Screwdrivers, Nails Bolts, Nuts
Articles = One for each of the Drills, Screwdrivers, Nails Bolts, Nuts

Use Section and Category lists to organise it all as you see fit.

Offline

#5 2015-02-11 08:21:22

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: How to make a menu

The only caveat being that categories don’t uniquely belong to sections.

This shows the importance of careful planning before creating sections and categories. And then careful use to ensure you don’t end up mixing-and-matching in a way that breaks your hierarchy.

Offline

#6 2015-02-11 08:28:55

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

Re: How to make a menu

aslsw66 wrote #288175:

The only caveat being that categories don’t uniquely belong to sections.

This shows the importance of careful planning before creating sections and categories. And then careful use to ensure you don’t end up mixing-and-matching in a way that breaks your hierarchy.

That is very true but you could be having parent categories having the same names as the sections.


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

Offline

#7 2015-02-11 09:23:10

Freeant
Member
Registered: 2012-04-16
Posts: 36

Re: How to make a menu

OK)
Can u show an example of the menu code?

Offline

#8 2015-02-11 12:22:37

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

Re: How to make a menu

txptips has a good example.


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

Offline

#9 2015-02-28 03:45:08

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,075
Website Mastodon

Re: How to make a menu

I find it very confusing that there is all kinds of mentions of subsections or subsection. But there is no such tag or documentation on creating sub-sections.

This tixtip ( (which i’ll make use of ) has mention of sub-menus but not how to create them.

What should we be doing then? Using Categories? Can Categories be tied exclusively to a Section?

thanks.


…. texted postive

Offline

#10 2015-02-28 14:39:06

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

Re: How to make a menu

I find it very confusing that there is all kinds of mentions of subsections or subsection. But there is no such tag or documentation on creating sub-sections.

There’s no mention of sub-sections in this thread (so far), but you’re right, it doesn’t exist in txp.

Can Categories be tied exclusively to a Section?

No. As Anura / aslsw66 mentioned above “categories don’t uniquely belong to sections” but you can voluntarily organise them that way yourself if you want to.

Yiannis also pointed to a potential solution using naming as a way of creating a bridging between sections and categories: if you organise the categories that you want to ‘look like sub-sections’ within a parent category, and name that parent category the same as your section name, you can use txp:category_list and the attribute parent='<txp:section />' to output a list of categories per section, for example when building a menu.


TXP Builders – finely-crafted code, design and txp

Offline

#11 2015-02-28 16:43:24

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,075
Website Mastodon

Re: How to make a menu

@jakob – thanks. that helps get my head around the issue.

But i have seen references to TXP and Subsections and submenus TxpTips listed above. etc. It would be clearer if the just said A Section with Categories

as the thread indicates one has to plan carefully before creating sections and categories


…. texted postive

Offline

#12 2015-02-28 18:02:24

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

Re: How to make a menu

Yes, it’s a topic that comes up repeatedly – though the particular thread you link to is a “features idea” originally proposed over ten years ago(!) so that was imagined functionality not real functionality. It’s also a topic where normal language usage and txp terminology overlap causing additional confusion.

TXP is limited when it comes to sites with deep, nested structures. While this is a limitation, it can also be (construed as) as a virtue as it ensures that sites don’t go overboard with nesting!

Sometimes, though, there are occasions where you need to go one level deeper. In that case you can usually fake it. For the menu with sub-menus, there are lots of methods, some described in this thread or on txptips.com. You still end up with urls that look like this:

www.domain.com/section/
www.domain.com/section/?c=category  <-- sub-level as category
www.domain.com/section/individual-article-title <-- individual article

Often that’s okay, and the individual article url is often okay without the category featuring in it. This thread contains some ideas for making /section/category links look prettier. If you really need something like /section/category/individual-article-title, the only way – as far as I know – is using the plugin gbp_permanent_links which allows you to build custom url-schemes on a per-section basis.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB