Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#169 2010-08-11 22:02:55

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

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

jcd wrote:

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

Hi jcd. Now, that’s interesting …

Offline

#170 2010-08-19 23:51:25

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

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

Version 0.12 now available.

  • new attribute ‘current_children_only’ (for ttr & caruso_g)
  • enhancement: new (automatic) way of coping with accented characters (thanks ttr)
  • enhancement: minor admin tab improvements
  • fix: error when adi_menu_breadcrumb used more than once on a page (thanks jcd)
  • fix: current_children_only not functioning correctly (thanks jcd)
  • fix: couple of uninitialised variables generating error_log messages (lines 827, 837)

… apologies for filling up your error log files :-(

I’m hoping that this will be the last 0.x version of adi_menu. The plan(!) is that the next will be 1.0 which will have section redirect, alternative section titles and the new article system.

Offline

#171 2010-09-11 09:42:46

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

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

Hi Adi, hi All,

I encountered an error when using adi_menu on a 404 error page (using standard error-default) :

<txp:adi_menu menu_id="" class="subMenu" sub_menu_level="2" escape="" sections='<txp:rah_repeat_value />' include_default="0" sort="adi_menu_sort" /> -> Notice: Undefined index: on line 1151

Error occurs when sub_menu_level > 1 and in an error page where section is empty ($s=’‘).

Workaround : at the top of error-default, I put
<txp:php>global $s; $s="default" ;</txp:php>
which solves the problem for me.

Is this a bug ? Am I doing something wrong ?
Thank you !

Offline

#172 2010-09-12 21:31:55

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

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

CeBe wrote:

I encountered an error when using adi_menu on a 404 error page (using standard error-default)

Hi Claire. You’re not doing anything wrong! I’ll look into it.

Offline

#173 2011-05-02 00:11:44

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

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

Version 1.1 is a major update for adi_menu. It includes some new features, minor improvements to the admin tab and a big change in the way articles are delivered.

In brief:

  • section redirection
  • alternative section titles
  • new article mode
  • minor adi_menu admin tab improvements & fixes
  • Write tab section popup enhancements (for Bloke)
  • a new styling attribute ‘odd_even’
  • section sort now defaults to “adi_menu_sort”
  • fix: error on error page when sub_menu_level > 1 (thanks CeBe)

Upgrading should be seamless, however you must visit the adi_menu admin tab immediately after installation so that the new database columns can automatically be installed.

If you’re wondering what happened to version 1.0 – this was only ever for testing & contained some features that have been subsequently withdrawn (i.e. tabindex & accesskeys).

If you hit problems after the upgrade:

  • Let me know
  • Problems with articles?
    • In the new article mode the limit is set to 999
    • To enforce the old limit use article_attr='limit="10"'
    • If all else fails, try switching on the old article mode using new_article_mode="0"
  • Sections appearing in a different order?
    • Section sorting now defaults to “adi_menu_sort” & takes notice of the sort numbers in the admin tab
    • Try using sort="" to force database order (or if you’re not using the sort values in adi_menu admin set them all to zero)
  • Revert back to your previous version of adi_menu

adi_menu version 1.1 is available for download from here.

A big thanks goes to Jean-Claude (jcd) for testing the new version. His assistance has been essential in making this new release possible.

Offline

#174 2011-08-05 15:48:29

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

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

Hi Adi!
I use adi_menu in 99% of cases. It’s a great plug in!
I’ve got some suggestion for you. I don’t know if they are useful.
1 – Create and manege more then one menu. I’de like to create a menu selecting sections and other options directly in adi_menu tab. So I can recall them simply in adi_menu tag

<txp:adi_menu menu="main" />

2 – Let user use forms for output menu. In particular for speaking block and submenus.

That’s all!
Thank you for your great works :)

Offline

#175 2011-08-07 05:05:46

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

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

wornout wrote:

I use adi_menu in 99% of cases. It’s a great plugin!

Glad you find it useful.

1 – Create and manage more than one menu. I’d like to create a menu selecting sections and other options directly in adi_menu tab. So I can recall them simply in adi_menu tag

It’s a thought but I’m not sure if making the admin tab more complicated is such a good idea … if you find you’re repeating the adi_menu tag, perhaps storing it in a form & using something like <txp:output_form form="adi_menu_main" /> might help?

2 – Let user use forms for output menu. In particular for speaking block and submenus.

Have you tried the speaking_block_form attribute?

That’s all! Thank you for your great works :)

My pleasure.

Offline

#176 2011-08-07 05:55:26

Teemu
Member
From: Shanghai
Registered: 2010-04-27
Posts: 60

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

Hi Adi!

First of all thanks for a great plugin. I also use it a lot.

There’s one small problem I have encountered with my current project, which I haven’t been able to solve.

I’m trying to put adi menu in three places on a page set like this example:

<txp:adi_menu class="menu-1" default_title="Home" active_parent="1" active_class="active" exclude="section4,section5" />

<txp:adi_menu class="menu-2" sub_menu_level="2" active_li_class="active"/>

<txp:adi_menu class="menu-3" sections="section4,section5"/>

However, set like this, last menu-3 doesn’t show up.

If I remove menu-2, then menu-1 and menu-3 render just fine.

Also, if I remove sections="section4,section5" from the third menu, all three menus show up.

Could this be a bug, or am I doing something fundamentally wrong?

Offline

#177 2011-08-12 23:27:24

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

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

Hi Teemu,

Apologies for the late reply. Looks like there might be something funny going on!

What’s the section level structure you’ve got set up? i.e. who’re the parents & who’re the kids? And what do you want to see on the page?

Offline

#178 2011-08-13 03:12:57

Teemu
Member
From: Shanghai
Registered: 2010-04-27
Posts: 60

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

Adi, thanks for the response. My post above might be a bit misleading. My two level section structure is like this:

section1
section2 -section2a -section2b -section2c -section2d -section2e
section3 -section3a -section3b
section4
section5
section6
section7

Then I try to have three menus in section2 page template (slightly odd setup, but this is what client wants):

<txp:adi_menu class="menu-1" active_parent="1" active_class="active" exclude="section6,section7" />

<txp:adi_menu class="menu-2" sub_menu_level="2" active_li_class="active"/>

<txp:adi_menu class="menu-3" sections="section3b,section6,section7"/>

Last edited by Teemu (2011-08-13 03:14:25)

Offline

#179 2011-08-14 22:02:52

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

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

I love this plugin, adi! Been using it since you first wrote it and it’s absolutely fabulous. And now…

Here’s a new (to me) challenge I’ve not been able to solve that doesn’t appear to be mentioned in the forum discussion (though I may have missed it)…

Using Textpattern 4.3 (will upgrade to 4.4. shortly) and addi_menu 1.1, is this possible? —-

I’d like to be able to sort the article title list from a specific section by Posted date — but only from that ONE section — articles listed from all other sections would sort by title.

I’ve not been able to figure this out, and perhaps there isn’t any way to accomplish it short of hard-coding the menu, but thought it was worth asking here.

Here’s the code I’m using now. Works great for sorting everything by adi_menu custom sort order (for sections) then articles by title.

<txp:adi_menu class=“on_top” menu_id=”“ active_class=”“ parent_class=”“ list_id=“1” new_article_mode=“0” include_children=“1” sort=“adi_menu_sort” articles=“1” article_attr=‘sort=“Title” limit=“20”’ article_exclude=“news,diocese-news,latest-news,weekly-bulletin,podcast” />

Here’s the way this renders now…

section1
section2
—article A
—article B
—article C
section3
section4
section5
—child section 5-1
—child section 5-2
—child section 5-3
——article D (titled Friday)
——article E (titled Monday)
——article F (titled Saturday)
——article G (titled Tuesday)
—— etc for other days of the week
section6

What I’d like to do is set up section 5-3’s list to display in proper day-of-the-week order. And I’d prefer to avoid setting a number prefix for each article title (i.e. 1 Monday, 2 Tuesday, 3 Wednesday, etc.).

Any ideas? Thanks for any and all help!

P.S. you can see the site in question here . I’m trying to adjust the third child section under “Broadcasts” so only articles from this child display in Posted order. Everything else displays in Title order.

Last edited by bg (2011-08-14 22:07:33)


— Bob

Offline

#180 2011-08-17 04:44:41

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

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

bg wrote:

I love this plugin, adi! Been using it since you first wrote it and it’s absolutely fabulous.

Glad it’s useful.

I’d like to be able to sort the article title list from a specific section by Posted date — but only from that ONE section — articles listed from all other sections would sort by title.

Hmm, section specific article sort … the bad news is that there’s currently no built-in adi_menu functionality to do this.

There might be a way around it using stm_article_order – it’s an old plugin, which I think has been modified by Uli. You’d have to manually order some of the articles using it & then in adi_menu use article_attr='sort="position"'. You’d need to experiment though – I don’t know which order articles would appear in if they haven’t been “positioned”.

Maybe I need to introduce a bit more flexibility on the way adi_menu renders articles? I’ll put it on the list.

Offline

Board footer

Powered by FluxBB