Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#229 2012-06-29 10:56:49
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
gomedia wrote:
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.
Hi Adi
That sounds great – thanks!
Offline
#230 2012-07-19 14:35:03
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 562
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
I’ve just installed this plugin I keep getting the follwing error message in the admin interface when I try to use it.
Warning: Data too long for column 'event' at row 1 insert into txp_prefs set name = 'adi_menu_write_tab_select_default', val = '0', event = 'adi_menu_admin', html = 'text_input', type = '2', position = '0', prefs_id = 1 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\example\textpattern\lib\txplib_db.php on line 89
Last edited by Algaris (2013-07-10 22:56:42)
Offline
#231 2012-07-19 23:16:19
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Algaris wrote:
I’ve just installed this plugin I keep getting the follwing error message in the admin interface when I try to use it.
Warning: Data too long for column 'event' at row 1 insert into txp_prefs set name = 'adi_menu_write_tab_select_default', val = '0', event = 'adi_menu_admin', html = 'text_input', type = '2', position = '0', prefs_id = 1 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\truroschool\textpattern\lib\txplib_db.php on line 89
Er … we’ve been here before!
Offline
#232 2012-07-20 07:25:42
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 562
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Haha. I completely forgot I’d posted that, sorry. I even did a forum search as well. I’ll have a chat with the IT department to see if we can turn strict mode off.
If the events column is set to“varchar(12)” couldn’t I just change its setting in phpMyAdmin to allow more characters?
Last edited by Algaris (2012-07-20 07:26:05)
Offline
#233 2012-07-20 07:38:37
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Algaris wrote:
If the events column is set to“varchar(12)” couldn’t I just change its setting in phpMyAdmin to allow more characters?
It’s a possibility I guess … but probably not ideal – buggering around with the default setup might cock something else up.
I can only assume that the majority of MySQL installations are “relaxed” rather than strict – otherwise I’m sure this problem would rear its ugly head a lot more. If you don’t get any joy with your IT geezers, let me know & I’ll sort out a workaround in adi_menu for you.
Offline
#234 2012-08-31 03:31:47
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Version 1.3 now available for download
- TXP 4.5-ified
- moved install/uninstall to plugin options
- Textpack added
- tooltips thrown in the tip
- fix: preferences fully deleted on uninstall
- enhancement: adi_menu admin section redirect warning message
- enhancement: admin preference “Prevent widowed words in article titles” now obeyed (for springworks)
- code tidy up
- change: removed import functionality
- change: admin tab name changed “adi_menu” -> “Menu”
- change: use pluggable_ui instead of old inject method in Article tab
Offline
#235 2012-08-31 06:07:07
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Great, thanks Adi!
Offline
#236 2012-09-18 23:17:36
- lithium002
- Member
- Registered: 2011-04-29
- Posts: 25
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Hi Guys,
I had a question about displaying other siblings of a sub-section using adi_menu.
Basically, I have one section with four sub-sections. When you are on the homepage of the main section, there is a sidebar menu that shows the sub-sections as a secondary menu. I’m using the following code to generate the menu:
<code><txp:adi_menu default_first=“0” include_children=“1” active_ancestors=“1” active_parent=“1” active_class=“active_link” sections=’<txp:section />’ menu_id=“sidebar_menu” /></code>
This works well, however, when you click on a sub-section, the menu doesn’t appear. I know the reason why is because <txp:section /> now shows the sub-section and feeds it to the code, and since it doesn’t have any children (only other 3 siblings), the menu disappears.
So here is the dilemma: how do I produce a sub-menu that can appear on all sub-sections on a section without having to insert the parent section name directly into the code? I’m wondering because I have several sections with subsections, and doing it manually for each doesn’t seem like the best way to go.
Any ideas or help will be greatly appreciated!
Offline
#237 2012-09-19 05:50:13
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
lithium002 wrote:
So here is the dilemma: how do I produce a sub-menu that can appear on all sub-sections on a section without having to insert the parent section name directly into the code? I’m wondering because I have several sections with subsections, and doing it manually for each doesn’t seem like the best way to go.
Would this do it for you?
<txp:adi_menu sub_menu_level="2" />
Offline
#238 2012-09-19 18:12:46
- lithium002
- Member
- Registered: 2011-04-29
- Posts: 25
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Oh My God! Thanks so much. That was so easy, I feel a little dumb having asked this now.
Would it be possible to also output the parent section of the sub-menu? include_parent=“1” doesn’t work.
Last edited by lithium002 (2012-09-19 18:19:38)
Offline
#239 2012-09-19 21:51:32
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
No, it’s not currently possible to include the parent in the sub menu. Attribute include_parent=“1”
is a throwback to an old way of creating submenus. Maybe it should “do what it says on the tin”!
Normally, a top level menu is shown separately, e.g.:
<txp:adi_menu menu_id="top" include_children="0" />
but that shows all upper level sections.
I can’t recall if I’ve come across such a requirement before.
Last edited by gomedia (2012-09-19 21:55:08)
Offline
#240 2012-10-15 23:10:48
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_menu – section hierarchy, section menu and breadcrumb trail
Version 1.3.1 available for download
Highly recommended to use this one if you’re upgrading from before version 1.1.
- lifecycle “upgrade” pseudo-event
- fixed links to section tab in TXP 4.5
Offline