Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#217 2012-02-17 23:11:41

frickinmuck
Member
Registered: 2008-05-01
Posts: 118

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Thanks.


The AI does not hate you, nor does it love you, but you are made out of atoms which it can use for something else.

Offline

#218 2012-03-22 23:19:26

elwins
Member
From: Latvia
Registered: 2011-08-29
Posts: 80

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Totally nice plugin, really like it, but I have little problem.

I need menu, like this:

  • Menu 1 *
    1. Menu 1.2
    2. Menu 1.3
    3. Menu 1.4
    4. Menu 1.5
  • Menu 2 *
    1. Menu 2.2
    2. Menu 2.3
    3. Menu 2.4
    4. Menu 2.5

Okey, that I made, but how to made menu, who works like this: When I’m in Menu1, then I see only Menu1 submenus, when I’m in Menu2, then I see only Menu2 submenus, like this:

——————————————————-
  • Menu 1 *
    1. Menu 1.2
    2. Menu 1.3
    3. Menu 1.4
    4. Menu 1.5
  • Menu 2
    ——————————————————-
  • Menu 1 *
  • Menu 2
    1. Menu 2.2
    2. Menu 2.3
    3. Menu 2.4
    4. Menu 2.5
      ——————————————————-

Last edited by elwins (2012-03-22 23:30:42)

Offline

#219 2012-03-23 00:30:24

bg
Member
From: Pekin Illinois USA
Registered: 2005-02-20
Posts: 22
Website

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Adi… I meant to thank you for this ages ago, but since I forgot, I’ll do it now ;)

Thank you!

gomedia wrote:

Version 1.2 available for download

  • section-specific article sort (for bg)
  • enhancement: adi_menu admin sections link to TXP section tab
  • fix: ampersands in article titles (thanks renobird)
  • fix: admin styling for Hive
  • now uses lifecycle events for install/uninstall, so TXP 4.2.0+ is now required

— Bob

Offline

#220 2012-03-23 01:11:20

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

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

elwins wrote:

Totally nice plugin, really like it, but I have little problem.

Try using current_children_only="1".

bg wrote:

Adi… I meant to thank you for this ages ago, but since I forgot, I’ll do it now ;)

Thank you!

My pleasure, and thank you for your thank you!

Offline

#221 2012-03-23 17:56:36

elwins
Member
From: Latvia
Registered: 2011-08-29
Posts: 80

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Thanks, gomedia it works!

How to get class to second and third menu level, like SUBMENU1 and SUBMENU2 ?

<ul id="navigation">
<li class=""><a href="/home">Home</a></li>
<li class=""><a href="/about-us">About us</a></li>
<li class="active"><a href="/contacts">Contacts</a>
<ul class="submenu1">
<li class="active"><a href="/contacts/main-contacts">Main contacts</a></li>
<li class=""><a href="/contacts/employers">Contacts of employers</a>
<ul class="submenu2">
<li class="active"><a href="/contacts/main-contacts/office">Office</a></li>
<li class=""><a href="/contacts/employers/workshop">workshop</a></li>
</ul>
</li>
</ul>
</li>
</ul>

Now my menu code is like this:

 <txp:adi_menu current_children_only="1" active_li_class="active" active_ancestors="1" parent_class="" class="navigation" />

Last edited by elwins (2012-03-23 20:24:35)

Offline

#222 2012-03-23 22:30:30

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

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

elwins wrote:

How to get class to second and third menu level, like SUBMENU1 and SUBMENU2 ?

As you’re only listing submenus of the currently active section, you can use this for submenu1:

ul#navigation ul { ...}

And for submenu2:

ul#navigation ul ul { ...}

Alternatively, if you use list_id="1", you can target specific submenus, e.g.

ul#navigation li#menu_contacts ul { ...}

Offline

#223 2012-03-23 23:04:47

elwins
Member
From: Latvia
Registered: 2011-08-29
Posts: 80

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Big Thanks! Didnt think about CSS! :))

Last edited by elwins (2012-03-23 23:24:54)

Offline

#224 2012-04-26 14:03:20

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

I can’t publish to default section no more. Is the last version of adi_menu?

Offline

#225 2012-04-26 23:44:58

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

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

wornout wrote:

I can’t publish to default section no more. Is the last version of adi_menu?

Hi wornout,

OK, here’s the deal. You can’t assign articles to the default section, well, not in standard Textpattern anyway.

The ability was introduced in an early version of adi_menu (0.8 probably) and it’s a bug. In version 1.2, I introduced a mechanism that prevented this – it kicks in if there’re no existing articles in the default section. Websites that already have articles in default won’t be affected.

It’s been such a useful option, that has worked well for me, it’s taken a while to realise that it’s not allowed! Why shouldn’t the Home page have it’s own articles? Maybe I should ask one of my “Why does it have to be that way” questions.

Anyway, here’re the options when using version 1.2 & above:

  • For existing websites:
    • Keep calm and carry on – if you’ve got articles in the default section then adi_menu will still allow you to add more. If there aren’t any, you won’t be allowed to go down that path
    • Don’t panic – if you don’t like the idea of default articles then reassign them to a different section and adjust your home page accordingly. As soon as the last one is taken out of default, adi_menu will quietly hide the option
  • For new websites:
    • Nothing to be seen here, move along now – you can’t have articles in the default section

Offline

#226 2012-04-27 08:15:35

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Thanks for quick response Adi!
It’s not a big problem… but I use this hack always (I use adi_menu in every Textpattern installation) so I’ll change my work plan for future projects :)
Basically I think there are logical reasons!

Offline

#227 2012-06-28 11:30:13

springworks
Member
Registered: 2005-01-06
Posts: 172
Website

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Hi Adi

Is there a way of enforcing the global admin preference “Prevent widowed words in article titles?” when including article titles in the menus generated by adi_menu?

Cheers

Steve

Offline

#228 2012-06-28 17:21:04

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

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

springworks wrote:

Is there a way of enforcing the global admin preference “Prevent widowed words in article titles?” when including article titles in the menus generated by adi_menu?

Hi, Steve. In brief, yes – if I program one in! I’m away from Textpattern for a few weeks, so if you can be patient I’ll sort it out on my return.

Offline

Board footer

Powered by FluxBB