Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#133 2009-08-22 08:17:37

Aeron
Member
Registered: 2009-06-02
Posts: 11

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

Thanks for you help with the above issue, but I was wondering if there is a way to add a class attribute to the second level <ul> sub menus? ie.


<ul id="mainmenu">
   <li>Home</li>
   <li>A
      <ul class="menusub">
         <li>B1</li>
         <li>B2</li>
      </ul>
   </li>
</ul>

Offline

#134 2009-08-23 00:13:41

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

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

Hi Aeron,

CSS can be used to target the second level <ul>:

ul#mainmenu ul { … 2nd level style …}

Adi

Offline

#135 2009-08-24 09:56:45

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

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

Adi, this is one comprehensive plugin! Nice work.

Apologies if this has been covered before — couldn’t find mention of it. Is it possible to make Adi menu display section Titles in the select list on the Write tab instead of Names?

I don’t mind if it’s a quick hack instead of a defacto plugin option. From my cursory whizz through the code I couldn’t see a way of making adi_menu_article_section_popup() use $title instead. Perhaps it’s in your array somewhere and I could just whip it out of there instead of using $name? I didn’t want to tinker too deeply in case it explodes ;-)

Tried using rah_section_titles as a workaround but that regenerates the entire list and removes your lovely indentation. Any thoughts or ideas greatly appreciated. Thanks.


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

#136 2009-08-24 13:16:13

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

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

Bloke wrote:

Adi, this is one comprehensive plugin! Nice work.

Thanks.

Is it possible to make Adi menu display section Titles in the select list on the Write tab instead of Names?

I would think it’s entirely possible. I probably picked names instead of titles because that’s what’s used by default. I’d need to have a fiddle. Leave it with me.

Offline

#137 2009-09-07 20:00:29

woof
Member
Registered: 2004-08-01
Posts: 128

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

Hi Adi – Thanks for a great plugin. I’m including articles (articles="1") and have a question about sorting them – I guess its not directly possible but perhaps someone can suggest a workaround.

So far the only method I can find to influence this plugin’s sorting of articles is renobird’s suggestion of combining it with stm_article_order but I would like to sort by a custom field value and wonder if there is any way to achieve this? Thanks

Offline

#138 2009-09-07 21:59:05

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

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

woof wrote:

… I would like to sort by a custom field value and wonder if there is any way to achieve this?

Just off the top of my head, perhaps you could set a sort number in a article custom field and then use adi_menu attribute:

article_attr='sort="custom_2" limit="12"'

Offline

#139 2009-09-07 22:42:53

woof
Member
Registered: 2004-08-01
Posts: 128

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

gomedia wrote:

article_attr='sort="custom_2" limit="12"'

Bingo! – that works perfectly. Thank you.

Offline

#140 2009-10-05 23:00:09

caruso_g
Member
From: Catania
Registered: 2009-04-11
Posts: 88
Website

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

Adi,
this is probably the best plugin I discovered for Textpattern, thanks a lot for all of your efforts and time in developing it. :D
I have a question on a need I have on a website I am developing.
I need to show articles as the second sub-level of a website menu build on sections as top level made with your plugin. Hiding the default section, the next first item is product. Giving the product section “selected by default” option I am able to show the articles on the home page.
Now the problem: how can I assign to the product navbar item created with your plugin the class “active” on the home page?
I am sure it is a newbye question, thanks in advance for your help.

Offline

#141 2009-10-06 09:09:59

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

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

Hi Giuseppe,

Not sure I quite understand what you’re asking. In principle the “active” class is section sensitive, in some way or another, so only the section that’s being displayed will show up as active.

Is this set up online anywhere I can see it?

Adi

Offline

#142 2009-10-06 10:42:36

caruso_g
Member
From: Catania
Registered: 2009-04-11
Posts: 88
Website

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

Adi, thanks for your great support. :)
It is still not alive. But I can try to explain it as better as I can.
I have three sections: Products, support, store.
I want the index page to show a short list of products, so with your plugin I will not show the default item, but just “Products | Support | Store”
So, landing on the home, I would like to set “Products” as the active link in the navbar since, products, will not have a landing page, it will be the home itself to mimic the Product page and I will be able to just visit its children (article that represent product items in the products section).
The structure, on the home page, should be like :

  • Products (class:active)
    • item 1
    • item 2
    • item 3
  • Support
  • Store

Thanks so much for your help.

Offline

#143 2009-10-08 09:59:18

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

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

caruso_g wrote:

… So, landing on the home, I would like to set “Products” as the active link in the navbar since, products, will not have a landing page, it will be the home itself to mimic the Product page …

Hmm, I think the short answer is no.

As I mentioned before, adi_menu is section sensitive – so when you land on the “home” page, the section called default is active. When the visitor goes to the Products page, then it becomes the active section.

Maybe you could approach it another way? Would having an automatic redirect from the default/home page to the Products page help? That way the user would aim for www.mywebsite.com, but get redirected to www.mywebsite.com/products – where the Products menu item would then be active.

Offline

#144 2009-10-08 11:09:44

caruso_g
Member
From: Catania
Registered: 2009-04-11
Posts: 88
Website

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

Hi Adi,
yes, you are right, it is not possible to do it. I searched for a solution too with no luck.
I figured another solution though. I set the product landing page to one Sticky article, which will be the first article sorted by custom fields value. This way I can create a presentation page for products directly in home page without the need to duplicate it in the actual Product page.
To solve the “current” issue, I set an id to the body tag based on the section, so that when default it will be “home” and a css selector #home ul#navbar li#products to assign the .current style to it when on the home page.
That said, if you feel it could be useful, could you add an option to add specific classes and ids to menu elements when on the home page?

Thanks anyway, your plugin rocks.

Offline

Board footer

Powered by FluxBB