Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-02-03 18:30:25

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: [request] Bounty: Ultimate Nav Menu Builder

jm wrote

(Not sure if I’m going to do this though.)

I hear ya. You really should though… :)

If you don’t take it – then you are definitely helping whoever does.

Last edited by renobird (2009-02-03 18:30:39)

Offline

#14 2009-02-03 22:06:58

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: [request] Bounty: Ultimate Nav Menu Builder

Wow…some very good ideas here. Hope someone steps up to do it.

Offline

#15 2009-02-04 00:13:04

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

Re: [request] Bounty: Ultimate Nav Menu Builder

Hi, everyone – I’m the author of adi_menu and I thought I’d have my tuppence worth!

One of the reasons I got fed up with cnk_section_tree was the conflict between it & sed_section_fields. From memory, it resulted in a blank Article Write page. As jm said, with the subsequent introduction of plugin load order in 4.0.7 this might not be a show stopper anymore.

I can see that people are keen on seeing the section hierarchy in the section dropdown and, I must admit I think it would be useful too, so I’ll have a fiddle & see what I can do for adi_menu. Don’t send any donations though because it’s not the whole of what you’re after (& besides I’ll probably “borrow” the code from somewhere else anyway)! No promises, but it might be a useful excercise. If all else fails I can always put in an Admin option to disable it!

With regards to the other requirement (jQuery drag & drop) – I’m not a Javascript expert, so I’m not your man for the sexy admin interface. Sorry. It’s a great idea though.

Having thought about what your requesting, let me play devil’s advocate for the moment, if I may:

  • isn’t the “dynamic” aspect of the proposed plugin going to disappear as soon as sections/articles are ordered beyond what can be done automatically by code (e.g: alphabetical order; sections first, articles last; random)? By nailing things down in a very specific & unique way, won’t you just end up with a fancy way of defining a handcoded Form to generate a menu?
  • I know with adi_menu & cnk_section_tree users are forced to pay a visit the Admin tab to assign parents, but generally when new sections or articles are added the plugin takes them on board & no operator intervention is required.
  • one other possible issue is that because you’re taking specific control of the menu output away from the tag and effectively giving it to an Admin tab then having multiple menus on a page would be problematic. Would you have multiple Admin tab for multiple menus?

Good luck with your search for the ulitimate menu plugin.

All the best,

Adi

Offline

#16 2009-02-04 05:49:57

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: [request] Bounty: Ultimate Nav Menu Builder

Hi Adi,

Thanks for checking this out.
I’m glad that you might look into showing the section hierarchy in the dropdown (for adi_menu).
I REALLY love your plugin – and it does 90% of what I need.

Some thoughts on your “devil’s advocate” questions (keeping in mind I don’t know how to make any of this work – so this is all purely conceptual)

isn’t the “dynamic” aspect of the proposed plugin going to disappear as soon as sections/articles are ordered beyond what can be done automatically by code (e.g: alphabetical order; sections first, articles last; random)? By nailing things down in a very specific & unique way, won’t you just end up with a fancy way of defining a handcoded Form to generate a menu?

My thought is that new sub-sections/articles get tacked on to the end of the menu using the usual sorting methods (e.g: alphabetical order; sections first, articles last; random). If you want to re-order or exclude them, then you have to go back to the “menu builder tab” and make the changes.

I know with adi_menu & cnk_section_tree users are forced to pay a visit the Admin tab to assign parents, but generally when new sections or articles are added the plugin takes them on board & no operator intervention is required.

I think my answer above explains my thought on this – anything new will show up after the “sorted” content.
If you want to sort or exclude it – you have to go back to the admin tab.

one other possible issue is that because you’re taking specific control of the menu output away from the tag and effectively giving it to an Admin tab then having multiple menus on a page would be problematic. Would you have multiple Admin tab for multiple menus?

I’m still thinking there would be a tag to create the menu. <txp:ult_menu /> for example.

With no attributes it would just create the menu you’ve defined in the admin tab.
With the addition of a section attribute you could restrict the output to just the menu items for that section.

That would allow you to use <txp:ult_menu /> for the main navigation – and something like
<txp:ult_menu section="products" /> to create a section specific menu in a sidebar.
(using the new tag parser you could just do <txp:ult_menu section='<txp:section />' />

I have NO IDEA if there are php/mysql/txp limitations that make some of these ideas impossible.

I’m just tossing ideas out there…

:)


Tom

Last edited by renobird (2009-02-04 05:50:45)

Offline

#17 2009-02-04 06:31:35

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

Re: [request] Bounty: Ultimate Nav Menu Builder

I wish I had more time to work on this – it would be a top plugin to create.

renobird wrote:

My thought is that new sub-sections/articles get tacked on to the end of the menu using the usual sorting methods.

Fair enough, that would be the sensible “default” way of operation.

With no attributes it would just create the menu you’ve defined in the admin tab.
With the addition of a section attribute you could restrict the output to just the menu items for that section.

The thing that would really stuff it up would be where you wanted two different sort methods. For example, custom sort in the main menu and alpahabetical in the submenu.

Maybe you’d have to do something like:

<txp:ult_menu scheme="main" />
<txp:ult_menu scheme="sub" />

Where different menu schemes would have different Admin-side configurations.

Having said that, I haven’t had a requirement for such a scenario. Mind you, I never thought I’d need sub-menus. The very next client site after I did some requested adi_menu sub-menu enhancements … guess what!

Offline

#18 2009-02-04 06:44:15

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: [request] Bounty: Ultimate Nav Menu Builder

The thing that would really stuff it up would be where you wanted two different sort methods. For example, custom sort in the main menu and alpahabetical in the submenu.

Hmm. I guess I’d only envisioned this as a way to generate a “custom” sorted menu.

For simplicity maybe just a sort attribute?
Anything passed to it would override the custom order.

<txp:ult_menu sort="alpha" />

You sure you don’t have any spare time?

:)


Tom

Offline

#19 2009-02-04 17:02:45

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: [request] Bounty: Ultimate Nav Menu Builder

Information gathering:
These sortable demos might be helpful.

Offline

#20 2009-02-05 12:19:24

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: [request] Bounty: Ultimate Nav Menu Builder

To get things going I’m putting together some jQuery/php code for the interface (dragging/dropping/sorting). I’ll clean things up a bit and post the code this evening.

Offline

#21 2009-02-05 12:33:29

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

Re: [request] Bounty: Ultimate Nav Menu Builder

Would you believe it? Look what has just dropped into the adi_menu forum.

Offline

#22 2009-02-07 02:51:47

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: [request] Bounty: Ultimate Nav Menu Builder

Hi guys,

I promised to post some proof-of-concept code of jQuery’s drag/drop/sorting functions. After some initial testing I decided to take it a step further to get some functionality I’ve been missing in TXP: easy and fast (as in drag-and-drop) navigation building for my clients. I don’t want them messing about in the pages. And I don’t want to spend time editing just 1 txp:section_list tag for an navigation update.

After some frantic coding today it turned into a complete plugin (actually my first ever plugin!) which allows building/sorting a section based navigation on the admin side and spits out the ordered sections on the public side with a tag. Editing/re-ordering of the navigation is very easy and quick.

It’s far from what has been discussed here and I’m not sure I’m the guy for the job to make the “ULTIMATE” Nav Menu Builder. But this plugin could be the starting point of something like that. I’m running into some issues. jQuery UI does not allow nesting of sortable lists natively….I’m researching jQuery plugins for this. Also I have no idea how to do subsections in textpattern….any help would be appreciated, I’m looking at the obvious TXP plugins to see how it’s done.

Anyway…here’s the plugin: jvh_navbuilder
Bear in mind that I threw this together just today and while I did do some testing, it’s considered unsafe for live sites at the moment, use it in a test environment ONLY!

This plugin requires the latest versions of jQuery and jQueryUI in your /textpattern folder.
Links are also included in the plugin info.

I’ll be cleaning up the code and doing some testing before officially releasing it in a couple of days. Any feedback is very much appreciated.

Last edited by jelle (2009-02-07 14:33:13)

Offline

#23 2009-02-07 04:22:44

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: [request] Bounty: Ultimate Nav Menu Builder

Hey jelle,

This looks like a great start! There are definitely some nested menu plugins out there – I’ll see what I can find.
Thanks for the work on this…it’s not 100% what I’m after – but I’ll bet it’ll make a lot of people happy. :)

I’ll report back after I’ve had a chance to test some more.

Just a quick note: if you want to try this plugin you will need to upgrade the jquery 1.2.6 that comes with TXP to jQuery 1.3.1 that the plugin requires. I don’t know if this will break anything else (so hang on to a copy of 1.2.6).

I’ve been experimenting a lot with adi_menu this week (it’s really quite an amazing plugin).
If we can somehow work towards merging the 2 ideas I think we’d be just about there.


Tom

Offline

#24 2009-02-07 14:59:51

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: [request] Bounty: Ultimate Nav Menu Builder

renobird wrote:

This looks like a great start! There are definitely some nested menu plugins out there – I’ll see what I can find.

Yup, the jQuery/interface side is not the problem. I’m having issues with the interal technical stuff. I’m not sure how to go about outputting nested navigation elements (subsections) and the database storage/retrieval of the data from the lists needs some carfull planning. I don’t have much experience in that field either.

Just a quick note: if you want to try this plugin you will need to upgrade the jquery 1.2.6 that comes with TXP to jQuery 1.3.1 that the plugin requires. I don’t know if this will break anything else (so hang on to a copy of 1.2.6).

Yes, but I’ve fixed that with an easy workaround. The plugin now calls to the 1.3.1 filename. No need to overwrite the original jquery.js that comes with Textpattern. Please download the updated version.
bq. I’ve been experimenting a lot with adi_menu this week (it’s really quite an amazing plugin).
If we can somehow work towards merging the 2 ideas I think we’d be just about there.

Yup, that was the idea when I started this piece of code: get the interface drag/drop/sorting part going. To fullfill my own needs for a simple navigation builder it quickly evolved into this plugin. If anyone steps up to build the plugin discussed in this thread, I’m happy to help on that end of it. Technically it’s just too complex for me to do all of it.

Last edited by jelle (2009-02-07 15:02:18)

Offline

Board footer

Powered by FluxBB