Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-01-20 22:15:40

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

Visual menu builder?

I have an existing site that I’m updating with a menu in the sidebar that has been entirely manually constructed in html using custom menu text, txp:permlink id="xx" and if_article_id to set the active class. The article ids are assigned to mostly two sections, which are entirely irrelevant to the menu structure.

I’ve been asked to make it possible for the site users to add / update the menu. Are there any good plugins for this?

  • I’ve looked at adi_menu but that seems to concern sections only. When assigning virtual sections, I can’t see how I can map them to a specific article. I can only redirect them to another section.
  • I’ve looked at stm_article_order but that seems to be concerned with the sort order of articles in their sections, and the possibility of dragging articles from section to section.

I’m looking for something where I can construct a menu visually out of specific chosen articles. Is there any such thing?

And if I’ve overlooked the functionality of the above plugins, I’d be glad for any pointers as to how these might be usable.


TXP Builders – finely-crafted code, design and txp

Offline

#2 2021-01-20 22:46:02

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

Re: Visual menu builder?

I’ve got this one and this one to offer.

Offline

#3 2021-01-20 23:02:51

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

Re: Visual menu builder?

etc wrote #328286:

I’ve got this one and this one to offer.

Nice, that might just do it. Oleg to the rescue once more!


TXP Builders – finely-crafted code, design and txp

Offline

#4 2021-01-21 09:31:21

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: Visual menu builder?

jakob wrote #328279:

… I’ve looked at adi_menu but that seems to concern sections only.

adi_menu will do articles – have a look at the help (search the page for “articles”).

etc’s plugin will undoubtedly give you more fine-grained control but adi_menu, being section based, will show all articles available – so if a new one is published you won’t need to manually update the menu.

Offline

#5 2021-01-21 10:27:47

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

Re: Visual menu builder?

gomedia wrote #328298:

etc’s plugin will undoubtedly give you more fine-grained control but adi_menu, being section based, will show all articles available – so if a new one is published you won’t need to manually update the menu.

Objection, your Honour :-) IIRC, one can include txp tags in etc_tree nodes, so <txp:article_custom section="whatever" /> should do.

Offline

#6 2021-01-21 11:22:40

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: Visual menu builder?

Should’ve realised! I’ve often wondered what adi_menu would look like if I was creating it from scratch now … it would be a lot like etc_tree.

Offline

#7 2021-01-21 14:31:44

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

Re: Visual menu builder?

gomedia wrote #328298:

adi_menu will do articles … but adi_menu, being section based, will show all articles available – so if a new one is published you won’t need to manually update the menu.

Thanks for the pointer. These are articles beneath sections. In this particular case the site is a bit like the old WP setup with page articles and post (news) articles so the menu is a selection of assorted page articles and not self-extending.

I tried wow_menu too and emulating the menu using categories but really it is faking it big time.

Another idea I had – aside from Oleg’s suggestion is – it’d almost be doable with smd_featured were it not for the nesting of sub-levels.


TXP Builders – finely-crafted code, design and txp

Offline

#8 2021-01-21 14:45:11

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: Visual menu builder?

jakob wrote #328308:

it’d almost be doable with smd_featured were it not for the nesting of sub-levels.

Intriguing. Never thought of using the plugin like that, but yeah. Since you can group the featured articles arbitrarily, you could ‘fake’ a hierarchy using some delimited notation (like dot) in your label. If you use sort="label" they’d come out in the right order. The trick then would be to use <+> (maybe) and wrapform / breakby to nest the ul/li tags whenever the number of dots changed.

An interesting exercise, but I’m sure there must be easier solutions!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB