Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#157 2010-03-19 11:59:34
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Great plugin :) – thanks
I just converted a static jquery dropdown menu in around 15mins :)
It’s late here so I could have missed it, but I’ve read this thread and the instructions and can’t find a way to produce clean urls.
All my section links are outputting index.php?s=section – is it possible to just have /section?
This is what I am using
<txp:adi_menu menu_id="top" class="level1" sort="name" />
and my permalink mode is
/section/title
Last edited by tye (2010-03-19 12:02:49)
Offline
#158 2010-03-19 12:31:24
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Hi Tye, adi_menu outputs the links according to TXP’s permanent link mode, so if they’re not appearing correctly then either the mode is set wrong or .htaccess isn’t set up correctly for clean URLs. As a test try outputting one of your section links using <txp:section />
& see what appears.
Offline
#159 2010-03-20 03:30:38
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Ah – got it, I had just installed gbp_permanent_links and hadn’t set any rules up yet.
All is working as it should now – thanks
Offline
#160 2010-04-06 14:42:02
- bmwg
- Member
- Registered: 2010-04-06
- Posts: 39
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
I get domain.com/section links. is it possible to get domain.com/section/subsection?
Offline
#161 2010-04-06 21:52:01
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
bmwg wrote:
I get domain.com/section links. is it possible to get domain.com/section/subsection?
That’s the Holy Grail your looking for then! Sorry, don’t know how to achieve that. I’m not enough of an htaccess expert to figure that one out.
Offline
#162 2010-05-28 10:43:29
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Hi Adi,
was thinking if it could be possible to add an option to redirect menu items to custom addresses.
For example, I have a support section of a client’s website that should link to his account on Zendesk.com
What about a solution like in this quick mockup?
If not, any solution?
Thanks for your help
Offline
#163 2010-08-08 17:42:31
- jcd
- Member
- Registered: 2010-04-15
- Posts: 12
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Hi adi,
thanks for writing this wonderful plugin and for including the current_children_only option in the 0.12beta release!
There is one problem though I encountered with this new option. Let’s say I have a section hierarchy similar to this:
A
-A1
-A2
B
-B1
-B2
I set active_ancestors=“0” since I only want the active section to be highlighted, not its parents. At first only A and B are visible in the menu, as expected when using current_children_only=“1”. When I click A, the subsections A1 and A2 appear, as expected. As soon as I click on a subsection like A1 though, the menu collapses back to the first level. Only A and B are visible in the menu, but the browser actually is on page A1. With active_ancestors=“1” it doesn’t happen, but that can be only a temporary solution since I really only want one section at a time to be highlighted. Is there a solution to this, maybe I am missing something?
Also, where can I donate for the plugin? Thanks!
jcd
Offline
#164 2010-08-08 20:46:35
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
jcd wrote:
thanks for writing this wonderful plugin and for including the current_children_only option in the 0.12beta release!
Hi jcd, my pleasure.
There is one problem though I encountered with this new option. Let’s say I have a section hierarchy similar to this:
A
-A1
-A2
B
-B1
-B2I set active_ancestors=“0” since I only want the active section to be highlighted, not its parents.
active_ancestors="0"
is the default position, so you don’t have to explicitly set it – but it shouldn’t do any harm.
At first only A and B are visible in the menu, as expected when using current_children_only=“1”. When I click A, the subsections A1 and A2 appear, as expected. As soon as I click on a subsection like A1 though, the menu collapses back to the first level. Only A and B are visible in the menu, but the browser actually is on page A1. With active_ancestors=“1” it doesn’t happen, but that can be only a temporary solution since I really only want one section at a time to be highlighted. Is there a solution to this, maybe I am missing something?
Hmm, I can see that happening too. It’s not immediately obvious why fiddling with an active class setting should affect which sections are output. I’ll have to think about that one! Perhaps as a temporary measure you could do something in CSS to un-highlight the ancestor section?
Also, where can I donate for the plugin? Thanks!
That’s very kind of you. You’re very welcome to donate, but not to me, make a donation to the Textpattern developers – they’re the ones who do the hard work, I just muck around on the fringes.
Cheers, Adi.
Offline
#165 2010-08-08 20:49:13
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
caruso_g wrote:
was thinking if it could be possible to add an option to redirect menu items to custom addresses.
Just for the record, I’ve provided caruso_g with a lata-beta of adi_menu with this functionality. There’re other enhancements afoot, so it’s not ready for general abuse but if anyone wants to have a play, let me know.
Offline
#166 2010-08-09 09:08:16
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Adi made a great work.
I am heavily testing it and, so far (1 month), it is working great.
The new redirect option is working smoothly. It is really the option the plugin needed, now it is practically perfect.
I really think it should be included into TXP standard release (hint, hint, core devs…
Thanks so much for developing this plugin, it helps so much in our day by day work and you deserve this public thanks.
Offline
#167 2010-08-09 09:45:49
- jcd
- Member
- Registered: 2010-04-15
- Posts: 12
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
gomedia wrote:
You’re very welcome to donate, but not to me, make a donation to the Textpattern developers – they’re the ones who do the hard work, I just muck around on the fringes.
Done, and thanks again for your work.
Offline
#168 2010-08-11 18:18:01
- jcd
- Member
- Registered: 2010-04-15
- Posts: 12
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Hi adi,
I came across a problem, maybe you know a solution. When I call adi_menu_breadcrumb
more than once, I get this error message:
Fatal error: Cannot redeclare adi_menu_lineage() (previously declared in /…/textpattern/lib/txplib_misc.php(594) : eval()’d code:579) in /…/textpattern/lib/txplib_misc.php(594) : eval()’d code on line 579
I want to call adi_menu_breadcrumb
multiple times because I want to use it to generate the content of the <title>
and <h1>
tags like this:
<txp:adi_menu_breadcrumb link="0" default_title="Page Title" escape="htmlspecial" label="" separator=": " include_default="0" />
and of course once more for the actual linked breadcrumb trail.
Offline