Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2009-02-07 21:22:21

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

Re: [request] Bounty: Ultimate Nav Menu Builder

jelle wrote:

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.

It’s straightforward really – just add some extra columns to the database and mix in together with some tree hierarchy code.

jelle wrote:

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.

Looks like I need to have a play with your drag & drop experience! Sounds great.

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.

Perhaps we should have a go, especially as Javascript not my thing. Not sure if this interface can be a bolt-on for adi_menu or whether some new background code is required. Need to ponder such things.

renobird – I know one of the things you’re after is the section hierarchy in the article Write tab. I’ll do some work towards that end. Got to crawl before we can walk!

Offline

#26 2009-02-07 21:51:21

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

Re: [request] Bounty: Ultimate Nav Menu Builder

Gomedia Wrote

I know one of the things you’re after is the section hierarchy in the article Write tab. I’ll do some work towards that end. Got to crawl before we can walk!

That would be awesome!

This is all heading in the right direction – I’m excited.

:)


Tom

Offline

#27 2009-02-07 21:55:14

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

Re: [request] Bounty: Ultimate Nav Menu Builder

P.S.

gomedia wrote

especially as Javascript not my thing

That’s the beauty of jQuery – you don’t have to know a lick of javascript to understand it.

:)

Offline

#28 2009-02-08 22:35:30

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

Re: [request] Bounty: Ultimate Nav Menu Builder

gomedia wrote:

It’s straightforward really – just add some extra columns to the database and mix in together with some tree hierarchy code.

I’ve been studying your plugin. Very informative…

jelle wrote:

Perhaps we should have a go, especially as Javascript not my thing. Not sure if this interface can be a bolt-on for adi_menu or whether some new background code is required. Need to ponder such things.

Anything I can do to help, let me know.

Last edited by jelle (2009-02-08 22:36:49)

Offline

#29 2009-02-10 04:18:31

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

Re: [request] Bounty: Ultimate Nav Menu Builder

Tom’s had a play with it already but just for the record adi_menu 0.8beta has the required section hierarchy in the Article Write tab.

jelle wrote:

I’ve been studying your plugin. Very informative…

Thanks … I think … “informative” in a good way I hope!

I’ve installed your jvh_navbuilder plugin. Very nifty.

I’m thinking out loud here, but I’m wondering if jvh_navbuilder could be a sexy front end to the not-very-exiting adi_menu? Three main reasons really:

  • it would save having to reinvent the adi_wheel
  • it would give users two interface alternatives, because:
    • old fashionistas might prefer a conventional table layout
    • there may be features in adi_menu that you don’t want to implement in jvh_navbuilder
    • we should be careful not to disenfranchise users on browsers that can’t handle jQuery
  • operation & development of the two can run in parallel and only need to collide at the point when you click “Save”

And continuing along the lines of reusing ideas, perhaps we should make use of the way stm_article_order does its thing?

So to summarise, rather than jvh_navbuilder having it’s own database table, maybe you could make use of the way adi_menu stores it’s information and maybe I could make use of the way stm_article_order stores its article bits & bobs.

Last edited by gomedia (2009-02-10 04:19:23)

Offline

#30 2009-02-10 12:54:38

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

Re: [request] Bounty: Ultimate Nav Menu Builder

gomedia wrote:

So to summarise, rather than jvh_navbuilder having it’s own database table, maybe you could make use of the way adi_menu stores it’s information and maybe I could make use of the way stm_article_order stores its article bits & bobs.

Yes, that’s why your code was a quite interesting read (indeed in a positive way)…I’m getting to grips with how you handle and save the data.

jvh_navbuilder (when finished) will be a sort of “lite” navigation builder offering easy drag-drop section navigation building. Wheras a new incarnation of adi_menu, as you describe above, would be a complete navigation/article manager.

Right now I’m experimenting with jsTree as a replacement for my jvh_navbuilder interface. jsTree has loads of features which makes coding and data handling a lot easier, it integrates perfectly with jQuery and the design is very nice and clean.

I’ll be back with a completely new jvh_navbuilder later this week and I’ll keep an eye on the data handling part of it so the interface can easilly lifted over to adi_menu (or any other plugin).

Last edited by jelle (2009-02-10 12:54:56)

Offline

#31 2009-02-10 14:34:29

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

Re: [request] Bounty: Ultimate Nav Menu Builder

I like where this is all going….keep up the good work lads.

:)


Tom

Offline

#32 2009-02-18 06:02:12

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

Re: [request] Bounty: Ultimate Nav Menu Builder

Hi all.

You may have noticed I’ve released adi_menu version 0.8.

There’s also a hidden (beta) enhancement that you might like to have a play with.

Up until now in adi_menu, articles have been implemented using the standard <txp:article_custom /> tag and an external Form. I’ve introduced a new method where these are no longer used and adi_menu queries the database directly. This gives us the ability to dovetail articles with sections in the menu hierarchy.

  • to switch on this new functionality use adi_menu attribute test="1"
  • new attribute: article_class (user defined class on an article’s <li> – default = “menu_article”)
  • active_class & active_li_class now applied automatically to articles
  • new attribute: article_position (defines where articles appear – “after”, “before” or “dovetail” – default = “after”)
  • attribute modification: sort (now controls sorting of sections and articles when article_position="dovetail")
  • existing attribute: article_attr now mimics article_custom attributes (but will currently only understand ‘time’ & ‘limit’)

I haven’t updated the plugin help yet for the above so let me know if you have any queries.

If you use article_position="dovetail" sort="title" you should see your articles mingle with sections. I guess you can see where I’m going with this. If sections and articles can be sorted according to their title then, the next step is to sort them according to some other criteria (e.g. navbuilder order).

The first_class & last_class functionality improves as well – they’re applied to sections AND articles (they only work on sections in the old system).

Let me know how you get on.

Offline

#33 2009-02-18 11:06:52

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

Re: [request] Bounty: Ultimate Nav Menu Builder

Hi guys,

Adi, I’ll check out the new features later today.

I’m putting the finishing touches on my own website today. That has keeping my busy the past few days. But I’ve also been exploring the possibilities of jsTree. This has been evolving into a plugin that manages articles, sections and navigation (site structure) in one drag/drop interface. Adi, because of the progress I’ve been making, I’m not sure if we’ll be able to lift the interface and put it onto adi_menu as mentioned before, sorry.
Right now I’m experimenting how to link the jsTree callbacks (like onMove, onDrop, onRename, onDblClick) to internal textpattern functions so this plugin can actually manage articles (change title, status etc.) and sections (sorting/ordering/nesting).

I’ll keep you guys informed.

Last edited by jelle (2009-02-18 11:27:24)

Offline

#34 2009-02-18 12:08:23

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

Re: [request] Bounty: Ultimate Nav Menu Builder

jelle wrote:

Adi, because of the progress I’ve been making, I’m not sure if we’ll be able to lift the interface and put it onto adi_menu as mentioned before, sorry.

adi_menu stores additional information about sections in the standard ‘txp_section’ table in the database: parent, exclude, sort etc. stm_article_order stores article sort information in the standard ‘textpattern’ table.

Because it’s in the database this information can be modified independently. Surely it would be a simple thing to manipulate this information, particlularly the sort values, in a drag/drop interface? If you can do this then we’re there. Drag & drop sets up the raw information, adi_menu translates it into markup.

Offline

#35 2009-02-18 13:44:49

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

Re: [request] Bounty: Ultimate Nav Menu Builder

gomedia wrote: Surely it would be a simple thing to manipulate this information, particlularly the sort values, in a drag/drop interface? If you can do this then we’re there. Drag & drop sets up the raw information, adi_menu translates it into markup.

In theory it is…but I’ll need a bit of help getting the 2 setup properly as I’m fairly new to all this. :)
The plugin still needs a bit of work, then I’ll post it and we can see how to go from there.

Offline

#36 2009-02-18 14:42:47

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

Re: [request] Bounty: Ultimate Nav Menu Builder

Renobird: does small dance around the room

I’m am super excited with adi_menu as it is – with every step forward it just gets better and better.

Adi, I’ll check out all the new features today.

:)


TOm

Offline

Board footer

Powered by FluxBB