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
Wow, fast answer ;-) Now I know I have to stick with sections in my 1st en 2nd navigation level. The 3rd level only contains articles, so that works fine in adi_menu.
Didjee
Offline
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Adi,
Haha. It’s almost like I put Didjee up to that – but I didn’t – I swear.
Didjee, thanks for joining the movement. :)
Adi wrote
Just as an aside, does the articles bit work in adi_menu? I’ve never received any feedback about it.
Articles seems to work great. I experimented with that aspect of the plugin for a few hours last night – nice work!
If you combine adi_menu with stm_article_order you can custom sort the articles (won’t dovetail in with the sections, but it will give you some control).
- Install stm_article_order
- add sort=“position asc” to
article_attr
Example:
<txp:adi_menu menu_id="" class="menu" active_class="current" parent_class="" articles="1" article_attr='sort="position asc" limit="20"' sort="adi_menu_sort" />
Now go to Admin > Navigation and sort the articles however you’d like.
On more tip:
Install rvm_if_this_article – That will let you add an “active” class to the menu when you are viewing an article.
- Install rvm_if_this_article
- Call it from your adi_menu_artilces form
Example:
<li <txp:rvm_if_this_article> class="active"</txp:rvm_if_this_article>><txp:permlink><txp:title /></txp:permlink></li>
OK – that’s enough for one day. :)
—
Tom
Last edited by renobird (2009-02-05 14:52:57)
Offline
#75 2009-02-05 19:50:14
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
renobird wrote:
If you combine
adi_menu
withstm_article_order
you can custom sort the articles (won’t dovetail in with the sections, but it will give you some control).
Very interesting. I’ve never used stm_article_order
but I can see the appeal – the drag&drop changes the article’s section and there’s an additional database column called ‘position’ added to all the articles, which is used to define the output order.
The active article class tip is great as well.
Both of these ideas demonstrate a great advantage of calling standard tags/forms from a plugin – functionality can be manipulated without resorting to PHP.
What a top CMS we have here …
Offline
#76 2009-02-06 20:50:48
- debegray
- Member
- Registered: 2009-02-04
- Posts: 30
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
I am getting an extensive error message when I try to install this from the adi_menu tab. This is the beginning:
Warning: Unknown column ‘adi_menu_exclude’ in ‘field list’ SELECT name, title, adi_menu_parent, adi_menu_title, adi_menu_exclude, adi_menu_clone, adi_menu_sort FROM txp_section ORDER BY name in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_db.php on line 82
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_db.php on line 288
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_db.php on line 290
Notice: Undefined variable: out in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_misc.php(570) : eval()’d code on line 352
Warning: Invalid argument supplied for foreach() in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_misc.php(570) : eval()’d code on line 148
Warning: Invalid argument supplied for foreach() in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_misc.php(570) : eval()’d code on line 264
Offline
#77 2009-02-06 22:22:34
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
debegray wrote:
I am getting an extensive error message when I try to install this from the adi_menu tab. This is the beginning:
Yikes! What version of adi_menu
are you installing on what version of Textpattern?
Versions before 0.5 displayed errors in the Admin tab until properly installed.
Offline
#78 2009-02-06 22:45:24
- debegray
- Member
- Registered: 2009-02-04
- Posts: 30
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
I am using Textpattern 4.0.8 and adi_menu 0.7.
Offline
#79 2009-02-06 23:19:42
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
That combination works for me. And I’ve just re-installed it to make sure.
At what point do you see the errors? Is it after installing/activating adi_menu in the Plugins tab but before clicking “Install” in the adi_menu tab?
If you ignore the errors and click “Install” in adi_menu tab do they disappear?
Offline
#80 2009-02-06 23:45:09
- debegray
- Member
- Registered: 2009-02-04
- Posts: 30
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
I see the error message after I check Install and click “Do Admin” in the adi_menu tab.
Offline
#81 2009-02-07 00:08:11
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
debegray wrote:
I see the error message after I check Install and click “Do Admin” in the adi_menu tab.
Hmm, very odd. The errors indicate that one or more of adi_menu’s columns (in the database) don’t exist. The thing is, that’s what the Install operation is for – to add them in the first place.
After you’ve clicked for Install there should be a message from adi_menu in the top left of the page. Normally it would say something like “adi_menu installed”. What do you get?
Whereabouts physically on the page do you see the errors? Do you get anything else displayed? In principal, there should be a sections table above the “Do admin” button and a Section summary below.
Can you have a look under the Diagnostic tab & tell me if there’s any warnings there. Also what’s your version of MySQL (you’ll see it in the info window)?
Is this a first-time install or an upgrade from a previous version of adi_menu?
What happens if you try to uninstall adi_menu before installing it?
Offline
#82 2009-02-07 15:46:43
- debegray
- Member
- Registered: 2009-02-04
- Posts: 30
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
I think that’s the case – the columns are not being installed. Diagnostics are fine. MySQL version is MySQL: 4.0.27-max-log.
This is the message on the upper left: adi_menu: install not successful
Here’s the whole page after the install attempt:
Warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘BOOLEAN DEFAULT FALSE NOT NULL’ at line 1 ALTER TABLE txp_section ADD adi_menu_exclude BOOLEAN DEFAULT FALSE NOT NULL; in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_db.php on line 82
Textpattern
Warning: Unknown column ‘adi_menu_exclude’ in ‘field list’ SELECT name, title, adi_menu_parent, adi_menu_title, adi_menu_exclude, adi_menu_clone, adi_menu_sort FROM txp_section ORDER BY name in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_db.php on line 82
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_db.php on line 288
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_db.php on line 290
Notice: Undefined variable: out in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_misc.php(570) : eval()’d code on line 352
Warning: Invalid argument supplied for foreach() in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_misc.php(570) : eval()’d code on line 148
Warning: Invalid argument supplied for foreach() in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_misc.php(570) : eval()’d code on line 264
Section Title Exclude? Parent Sort order Clone? Clone title
Administration
Install Uninstall Import
Warning: Unknown column ‘adi_menu_clone’ in ‘field list’ select name,title,adi_menu_parent,adi_menu_clone,adi_menu_title from txp_section where adi_menu_exclude = 0 order by NULL in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_db.php on line 82
Warning: Invalid argument supplied for foreach() in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_misc.php(570) : eval()’d code on line 477
Summary
The above configuration will generate the following section hierarchy (subject to adi_menu tag attributes):
This is a first time install, not an upgrade. It’s a new installation of Textpattern and the only other plugin that is active is hak_tinymce.
When I try to uninstall, I get more code and a message that it was not successful. The code is, in part, Warning: Can’t DROP ‘adi_menu_exclude’.
Offline
#83 2009-02-07 21:05:38
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Thanks debegray. I think the clue is in the first bit:
Warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘BOOLEAN DEFAULT FALSE NOT NULL’ at line 1 ALTER TABLE txp_section ADD adi_menu_exclude BOOLEAN DEFAULT FALSE NOT NULL; in /homepages/23/d179350331/htdocs/textpattern/textpattern/lib/txplib_db.php on line 82
Textpattern
It looks like you’re on a old-ish version of MySQL that can’t handle my (possibly dodgy) query command syntax. This has happened before and some tightening up of the code fixed it. BOOLEAN
is probably the issue. Leave it with me.
Offline
#84 2009-02-07 21:51:48
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
debegray,
Try this one: 0.7.1
Offline