Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
We’ll be looking forward to that, Bob (bg).
This tip article by Kevin Potts also explains half of what I’m aiming for too, and more specifically like I want to do it using the sections_list approach.
Offline
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
I’m building a website now that uses a 3 level main menu structure, based on sections:
- Section
- Sub section
- Sub sub section
- Sub sub section
- Sub sub section
- Sub section
- Section
- Sub section
- Sub sub section
- Sub sub section
- Sub sub section
- Sub section
- Section
- Sub section
- Sub sub section
- Sub sub section
- Sub sub section
- Sub section
It would be great if it’s possible to keep the top level section ‘active’. Will this be possible in a future release?
Didjee
Offline
#63 2009-01-28 20:53:59
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Hi Didier,
Do you mean that you want the active class assigned to the top level section of the active sub-section?
At the moment active_parent="1"
will do this for the immediate parent section – which might not necessarily the top level.
Offline
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Hello Adi,
Yes, I mean that, if level 3 is active, the active class is also assigned to the immediate parent section (level 2) AND the top level section (level 1).
That possibility would be great (in a future release)!
Didier
Didjee
Offline
#65 2009-01-28 21:36:21
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
I’ll look into it …
Offline
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Finally had a good reason to install this plugin – and WOW!
I’ve got a couple questions (maybe requests?)
- Is it possible to identify the hierarchy in the section dropdown on the write tab? This will be a main sticking point for turning sites over to clients. I know there’s a post early in the thread that says something about not doing this to avoid conflicts…I would assume the main issue would be with sed_section_fields (Maybe a quick collab with Netcarver to resolve?)
- When including articles in the menu are they included before/after/dovetailed with other sub-sections?
- What would happen if I have 2 sub-sections named the same thing? (ie: Sales Team)
EDIT: Just noticed Didjee’s post above about keeping top-level set to active (for children and grandchildren) – I could really use that as well.
—
Tom
Last edited by renobird (2009-01-30 21:15:24)
Offline
#67 2009-01-31 05:13:16
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Hi Tom.
renobird wrote:
Is it possible to identify the hierarchy in the section dropdown on the write tab?
Hmm, not sure about this. It was one of the things I really wanted to avoid, because of the conflict problem. Besides, I’m hoping that sub-sections is going to part of core TXP at some point.
When including articles in the menu are they included before/after/dovetailed with other sub-sections?
They’re presented after sub-sections on the same level.
What would happen if I have 2 sub-sections named the same thing? (ie: Sales Team)
adi_menu uses section titles defined under the Section tab. I haven’t tried duplicate titles but if TXP is happy with it then so will adi_menu be.
Just noticed Didjee’s post above about keeping top-level set to active (for children and grandchildren) – I could really use that as well.
I’m working on that at the moment …
Last edited by gomedia (2009-01-31 05:14:30)
Offline
#68 2009-02-01 04:43:52
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Version 0.7 is now available for download.
Summary:
- new adi_menu & adi_menu_breadcrumb attribute: ‘escape’
- new adi_menu attribute: ‘active_ancestors’ (for Didjee)
- fix: adi_menu admin hierarchy summary now shows children again
- fix: no longer get double row of admin page tabs before adi_menu installed
The new active_ancestors
attribute will set the active_class on all sections that are ancestors (including the parent) of the currently active section.
The new escape
attribute defaults to “html” so HTML special chars in section titles are converted (e.g. &
becomes &
). Something happened between 4.0.6 & 4.0.7 that affected the way section titles were stored & presented. For example in 4.0.6, “Rock & Roll” was stored in the database as such but confusingly presented in the Section tab as “Rock & Roll”. Even more confusing, clicking Save a second time in the Section tab changed the &
back to &
in the database. &
etc had to be coded by hand so that the Section titles we’re rendered correctly on the page. In 4.0.7, Section titles are entered as “Rock & Roll”, stored in the database as “Rock & Roll” and automatically escaped when converted to HTML. I’m sure I’ve read something about this somewhere … Don’t know what happens when sites are converted from 4.0.6 to 4.0.7 and I hope there’s someone who can explain all this before my head explodes. If you find that you start seeing &
in the menu then the new default functionality can be switched off by using escape=""
.
See online help for more information on the new attributes.
Let me know if I’ve broken anything for anybody.
Last edited by gomedia (2009-02-01 04:47:57)
Offline
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Adi,
This plugin is amazing. But doesn’t quite cover what I need.
I posted a request that addresses some of what I’m after.
Hopefully someone will pick it up.
:)
Offline
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
gomedia wrote:
- new adi_menu attribute: ‘active_ancestors’ (for Didjee)
Great addition to this plugin. Thanks!
Didjee
Offline
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Is there a possibility to ‘force’ the order of sections and articles in the menu? For example:
- Section A
- Sub section 1
- Article 1
- Article 2
- Sub section 2
- Article 3
- Section B
- Section C
Now my articles are always shown after the sections like this:
- Section A
- Sub section 1
- Sub section 2
- Article 1
- Article 2
- Article 3
- Section B
- Section C
Didjee
Offline
#72 2009-02-05 12:07:17
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Didjee wrote:
Is there a possibility to ‘force’ the order of sections and articles in the menu? For example:
Blimey, it’s a pincer movement.
The short answer is no. The long answer is maybe, if I get ground into submission … renobird is currently working on that.
One of the reasons I’m baulking at this, apart from a lack of spare time, is that it looks like it may turn out to be a Big Job.
However, although adding active_ancestors
took a bit of creativity, it actually turned out OK (from a ‘elegant’ coding point of view).
Never say never I suppose (I remember originally I wasn’t going to do articles at all).
Just as an aside, does the articles bit work in adi_menu? I’ve never received any feedback about it.
Offline