Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2007-03-23 16:31:02

robert1
Member
From: Passau
Registered: 2005-08-07
Posts: 51
Website

Re: [plugin] [ORPHAN] wow_menu-Full menu control (order, hide/show items, subtree)

Hm.
I just want show the main catgeories, and child categories only, when the parent category is choosen/active.
I’ve tried and tried…

Is this possible? And how?

Thanks so much.

Offline

#86 2007-03-24 15:29:45

nighthawk
Archived Plugin Author
From: Frankfurt, Germany
Registered: 2005-11-05
Posts: 87
Website

Re: [plugin] [ORPHAN] wow_menu-Full menu control (order, hide/show items, subtree)

Hi Robert,

I’m afraid that’s beyond the functionality scope of this plugin – you can easily achieve this by using CSS, though. The plugin automatically generates JavaScript arrays which contain the menu category names and references so you can also build a nice JavaScript application around it.

If you wait a couple of days, I can provide you with a URL to a site for which the plugin is in service – including CSS for creating the effect requested by you. The site just isn’t officially online yet.

Cheers!

Offline

#87 2007-03-24 20:02:17

nighthawk
Archived Plugin Author
From: Frankfurt, Germany
Registered: 2005-11-05
Posts: 87
Website

Re: [plugin] [ORPHAN] wow_menu-Full menu control (order, hide/show items, subtree)

Hey GeertAki,

thanks for your suggestions!

1) that’s a feature I have been pondering for a while, too, but I honestly think it’s not necessary. After you have sorted the menu items for the first time (usually after installing it and preparing the menu order), there usually is no need to sort them by name. Also an auto-sort is not really the intention of the plugin, as it takes control away from the user. So, unless there’s a strong demand for such a feature, I will not implement it.

2) Using clean URLs is neither possible nor reasonable with wow_menu – please check this post earlier on in this thread.

3) Good point! Implemented that and will release with 1.02 in a couple of minutes.

4) That’s already there – see attribute “js_arrays” :)

Thanks for your feedback!

Offline

#88 2007-03-26 01:52:46

robert1
Member
From: Passau
Registered: 2005-08-07
Posts: 51
Website

Re: [plugin] [ORPHAN] wow_menu-Full menu control (order, hide/show items, subtree)

Thanks Björn.

Offline

#89 2007-05-29 04:17:10

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: [plugin] [ORPHAN] wow_menu-Full menu control (order, hide/show items, subtree)

Thanks for the awesome plugin! It’s almost perfect for a client project I’m working on. There’s just one quirk that would make it dangerous for my client to use wow_menu’s best feature — menu re-ordering. I’m a little brain-fried after a long day, so I hope this post makes sense…

At its root, this has to do with the kind of list-hiding CSS trickery that nighthawk hinted at in post #86. Just to make sure we’re on the same page, here’s how I used CSS to hide subcategories except for within the current parent category. I’d guess this is how nighthawk did it too:

Step 1 — Apply current category or section name(s) as an id or class to the <body> element.

Step 2 — Use something like the following CSS to make sub-categories “disappear” unless you’re in their parent category (note the use of matching section & category names for the sal="1" thing):

#menutree ul ul { display: none; }

body#section #menutree ul#U1,
body.section #menutree ul#U1,
body.subcat1 #menutree ul#U1,
body.subcat2 #menutree ul#U1,
body.subcat3 #menutree ul#U1,
body.subcat4 #menutree ul#U1,
body.subcat5 #menutree ul#U1,
body.subcat6 #menutree ul#U1 { display: block; }

The problem that I’m facing is the relative inflexibility of this arrangement. This plugin assigns values to the id attributes of lists, list items, and links based on their position in the menu. If my client decides to re-order the menu later on, my CSS will break because the same id value will be given to a different list of sub-categories.

My suggestion: tie the id values to the categories themselves, rather than their position, to maintain consistency regardless of menu order. For example:

  • Root <ul> element gets an id of “menutree” (why is it in a containing div?) if the plugin’s start attribute isn’t used. If start is used, then the id could reflect the ID number of the category in question — “Uxx” where xx is the ID of the category specified with start.
  • The list items and links for category 23 get id values of “L23” and “A23”, respectively.
  • The list of sub-categories beneath category 23 could be <ul id="U23sub"></ul>.

You could use a similar strategy with category names instead of category IDs. For example, “U_my-category-name_sub”.

Some way of identifying menu items by what they are, instead of where they are, would help make wow_menu’s menus a lot more future-proof. What are the chances of seeing a feature like this in the plugin someday?

Oh, and… thanks for listening to me ramble. :-)

Offline

#90 2007-05-29 12:14:58

veggiegrrl
Member
Registered: 2006-02-05
Posts: 13

Re: [plugin] [ORPHAN] wow_menu-Full menu control (order, hide/show items, subtree)

Has anyone used something like Suckerfish or other CSS markup to generate drop-down or fly-out menus with this plugin? If so, could you point me to it? I’d love to see some examples.

Offline

#91 2007-05-31 05:34:32

The-Exit
Member
From: Berlin
Registered: 2005-07-16
Posts: 175
Website

Re: [plugin] [ORPHAN] wow_menu-Full menu control (order, hide/show items, subtree)

hi

this is an awsome plugin.

unfortunatelly, i figured out, that the “wow_menu_if_sub_of”-Tag cannot contain the wow_menu-tag. e.g.

<code>
<txp:wow_menu_if_sub_of cat=“accessoires” >
<h3>Accessoires</h3>
<txp:wow_menu start=“accessoires” sal=“0” showparent=“0” showcount=“1” />
</txp:wow_menu_if_sub_of>
</code>

is there a possibility, to have a menu, which will displayed, when the current article’s category is part of the tree?

Offline

#92 2007-07-08 22:51:28

smshUA
New Member
From: Ukraine
Registered: 2007-07-03
Posts: 2
Website

Re: [plugin] [ORPHAN] wow_menu-Full menu control (order, hide/show items, subtree)

Just modded source to add a class identifier to current <li> tag. You can grab modded version at http://shev.org.ua/txp/ . It adds class=“active” to a <li> of current category. Author, please integrate this feature to official version! All my mods marked as //smsh in source code. Good luck!

Last edited by smshUA (2007-07-08 22:52:43)

Offline

#93 2007-08-05 09:34:50

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: [plugin] [ORPHAN] wow_menu-Full menu control (order, hide/show items, subtree)

I’m using mod_rewrite on site and I’d like wow_menu to support this feature. Is there any way to make wow_menu (or any other plugin, if it exists) to provide
http://www.okoshki.by/category/other"
instead of
http://www.okoshki.by/index.php?c=other ?

Or is there any way to make sorted category list with txp?

Last edited by the_ghost (2007-08-05 09:37:28)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#94 2007-09-10 10:55:39

fbox
Member
From: Melbourne
Registered: 2006-02-18
Posts: 42

Re: [plugin] [ORPHAN] wow_menu-Full menu control (order, hide/show items, subtree)

Hi Björn! Download link has been timing out for the last while. Tried using Google’s cached version of the TXT file here but that didn’t work and it did work with some reformatting of the plugin code ;-)

@ smshUA: your modded source at http://shev.org.ua/txp/ seems to be an empty page.

Starting to feel lonely better

– L.

Last edited by fbox (2007-09-10 11:22:16)

Offline

#95 2008-08-27 22:25:58

xzamen
Member
Registered: 2007-02-12
Posts: 18

Re: [plugin] [ORPHAN] wow_menu-Full menu control (order, hide/show items, subtree)

Is this thread still alive?
This is a great plugin, but it would be even better if there was a possibility to choose among article, image and file categories. I really need to have a menu with image categories for displaying a gallery depending on a category. Now I’m using <txp:category_list type=“image” />, but I need an option to format nested categories. Are there any suggestions?
Also it would be great if wow_menu could generate friendly URLs.

Offline

#96 2009-11-15 01:31:41

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: [plugin] [ORPHAN] wow_menu-Full menu control (order, hide/show items, subtree)

I figured out how to modify wow_menu so that it outputs clean URLs!

Here is how:

1) Go into the plugins tab and click to edit the wow_menu code.
2) Wherever you find buildhref("s" in the code, replace it with buildhref("" (note: you’ll find it on line 231, 313 and 339)
3) Wherever you find buildhref("c" in the code, replace it with buildhref("category/" (note: you’ll find it on line 232, 314 and 340)
4) On line 384, replace if (!$sal) $type = "c"; with if (!$sal) $type = "category/";
5) On line 385, replace $href = hu . 'index.php?' . $type . '=' . urlencode($target); with $href = hu . $type . urlencode($target);

Offline

Board footer

Powered by FluxBB