1 of 4
1
Taxonomy Module for EE 2.0
Posted: 12 April 2010 09:44 AM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  446
Joined  01-14-2006

Hey,

I’ve been plodding away the last week or so on a new module called Taxonomy which I’d like to throw out to any folks that are interested.

Basically, its a navigation building tool which uses nested sets to control hierarchy. The class used is straight from the CI community (MPTtree) and that does most of the heavy lifting.

Unlike the Pages Module, uri’s are using regular template/url_title paths - so the uri /about/whatever/ could represent something 10+levels deep in the Taxonomy module.

This is an early release, tested in a narrow environment, there will be bugs and some munty code around; I’m using this to learn PHP & CI development so if any devs want to lend a hand - feel free!

Screencast of module interface (updated 3rd June 2010)

Documentation & Download is here

Changelog

GitHub Repository

 Signature 

Weblog | @iain | Taxonomy for EE2

Profile
 
 
Posted: 12 April 2010 10:59 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  555
Joined  04-23-2008

Iain,

I just took a look at the screencast and like the concept very much. Do you have any plans of introducing a dedicated tab in the Publish Entry page to improve the workflow?

Profile
 
 
Posted: 12 April 2010 11:24 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  333
Joined  07-09-2008

Looks cool keep up the good work.

 Signature 

Brandon Livengood - twitter | blog
unleashedideas.com

Profile
 
 
Posted: 12 April 2010 03:02 PM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  760
Joined  02-11-2007

Nice work, this looks really promising!

 Signature 

bybjorn.com: ExpressionEngine Freelancer - Premium ExpressionEngine 2.0 Themes - ExpressionEngine Addons @ AddonBakery - contact me on twitter: twitter.com/bjornbjorn - Zerply profile: zerp.ly/bjornbjorn

Profile
 
 
Posted: 12 April 2010 03:28 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  566
Joined  12-08-2007

This is one of the times when site admins will want to give this its own tab in the main menu. Very nice work!

 Signature 

www.pixogee.com EE Pro Network

Profile
 
 
Posted: 12 April 2010 03:35 PM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  140
Joined  05-25-2006

so good, exactly what I’ve been needing! Great work!

 Signature 


Brandon Neil Richards
http://www.brandrichmedia.com/knoxville_web_design
——————————————————————

Profile
 
 
Posted: 12 April 2010 05:25 PM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  446
Joined  01-14-2006
Danny Tam (mr_dimsum) - 12 April 2010 02:59 PM

IDo you have any plans of introducing a dedicated tab in the Publish Entry page to improve the workflow?

Yeah, it’s on the todo list.

I’ve actually got a version of the tab file which does work, it offers 3 fields: Menu Label, Parent, and template.

The issue here is, that trees can be made from entries derived from multiple weblogs… and you can have multiple trees!

So options are to create a fieldtype which will have some sort of tabbed interface that lets the user insert the node into whatever trees are available, or introduce a setting for ‘primary weblog’ per tree and have the tab function only available from that weblog.

Its a tricky one to explain, and I’m still figuring out the best approach. Any ideas/suggestions welcome!

Thanks for the interest in the module smile

 Signature 

Weblog | @iain | Taxonomy for EE2

Profile
 
 
Posted: 13 April 2010 09:24 AM   [ Ignore ]   [ # 7 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  446
Joined  01-14-2006

Just updated to V0.2, couple of new tags added,

{exp:taxonomy:node_url entry_id='{entry_id}' tree_id='1'

exp:taxonomy:node_url Outputs the url of the node as defined by Taxonomy.

{exp:taxonomy:get_children_ids tree_id="1" entry_id="{entry_id}"

exp:taxonomy:get_children_ids Outputs entry_ids of the immediate children of the specified node, and seperates them with a pipe for passing through to channel:entries tags.

All parameters are required.

 Signature 

Weblog | @iain | Taxonomy for EE2

Profile
 
 
Posted: 13 April 2010 07:31 PM   [ Ignore ]   [ # 8 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  817
Joined  03-20-2006

Hey Iain,

I’m playing around with your module and wondered if on line 2323 of mpttree.php you might want to test for the existence of $data[‘url_title’] and if not present, use $data[‘label’] instead (but obviously modified to replace spaces with underscores and lowercase it etc etc)? That way if my node is just a template and not a template and an entry i still get a unique classname for my menu item.

Anyway it seems pretty cool thanks, i’m having a good play with it and it’s pretty sweet. It’s certainly a nice way to build menus and i think having a tab would be a great addition to this module and make it easy and logical for end users to build menus (certainly something i haven’t felt any other solution does satisfactorily)

I look forward to future releases!!

Profile
 
 
Posted: 13 April 2010 09:39 PM   [ Ignore ]   [ # 9 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  446
Joined  01-14-2006

Thanks @audiopleb, I’ll add that for the next release.

Just incase anyone is having the same issue as me when displaying children nodes using the exp:taxonomy:get_children_ids method described in the docs example, it looks like EE2 bugs out with an sql query error if you pass an empty fixed_order=”” parameter to exp:channel:entries

You need to run a conditional to make sure the id’s exist before calling exp:channel:entries to workaround for now.

UPDATE: The issue has been fixed for the next release of EE

 Signature 

Weblog | @iain | Taxonomy for EE2

Profile
 
 
Posted: 14 April 2010 05:22 AM   [ Ignore ]   [ # 10 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  817
Joined  03-20-2006

Iain, No problem, i think you’ll want to use the url_title() function from the url helper on the label to make it css class friendly! (if you didn’t already know that of course!)

Also i think another thing that would be cool is if the output could be modified, for example if someone wanted a different type of html output they would have to modify the class directly. I know this is easier said than done but perhaps it might be something for the future!

Anyway, great work, it’s a real peach of a module for me.

Profile
 
 
Posted: 15 April 2010 01:18 AM   [ Ignore ]   [ # 11 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  446
Joined  01-14-2006

New version is up with your request @audiopleb for unique classes when no url_title is present.

also, new tag for fetching sibling entry_ids, and the documentation is getting more complete.

iain.co.nz/taxonomy

 Signature 

Weblog | @iain | Taxonomy for EE2

Profile
 
 
Posted: 16 April 2010 01:00 AM   [ Ignore ]   [ # 12 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  193
Joined  06-02-2008

I just tried to install this and got the following error

Fatal error: Class 'Taxonomy_upd' not found in /home/my_user_name/system_folder_for_this_site/expressionengine/libraries/addons/Addons_installer.php  on line 148 

I’ve put my system folder above my public root folder, so that may be the cause somehow.

Profile
 
 
Posted: 16 April 2010 03:17 AM   [ Ignore ]   [ # 13 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  446
Joined  01-14-2006

Hi Craig,

Sorry I can’t be of much help on this as I’ve never configured EE to be above the root, and given that this is a beta product being tested on a beta platform, I’d say the chances of getting a fix/workaround soon are pretty slim…

There’s images and javascript in the module that will need their path references updated if you’re going to be doing that, I’m planning on adding a preference to set where they are retrieved from so maybe after that’s established, I’ll look at the issue above…

That is unless any other developers chime in on what’s needed to get what you need,

cheers.

 Signature 

Weblog | @iain | Taxonomy for EE2

Profile
 
 
Posted: 16 April 2010 04:00 AM   [ Ignore ]   [ # 14 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  193
Joined  06-02-2008

Thanks iain.

I see also that the notes on EE202 suggest that any modules dependant on the pages module may have issues that will need to be addressed by addon developers. Hope that doesn’t mess things up for you too much.

Craig

Profile
 
 
Posted: 16 April 2010 04:33 AM   [ Ignore ]   [ # 15 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  446
Joined  01-14-2006
Craig Allen - 16 April 2010 08:00 AM

I see also that the notes on EE202 suggest that any modules dependant on the pages module may have issues that will need to be addressed by addon developers. Hope that doesn’t mess things up for you too much.

Not at all smile Taxonomy doesn’t use page uri’s the same way the Pages module does, it uses regular template/template_group/url_titles so it’s unaffected.

I have had a feature request to have the uri’s stored using the Pages method, but I’m yet to be convinced of the benefits. I’m not getting too hung up on the uri not reflecting how deep the user is in the site at all. It’s more the interface’s job to communicate this to the user in my opinion.

From experience with the pages module, in some sites I built the uris have gotten ridiculously long.

Plus, this way it’s more ‘native’ allowing you to pass extra segments without breaking the url and having to use workarounds. And, moving a node doesn’t change its uri, and won’t result in broken links on your site.

Any thoughts?

 Signature 

Weblog | @iain | Taxonomy for EE2

Profile
 
 
Posted: 16 April 2010 11:37 AM   [ Ignore ]   [ # 16 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  484
Joined  08-31-2004
iain - 16 April 2010 08:33 AM

Plus, this way it’s more ‘native’ allowing you to pass extra segments without breaking the url and having to use workarounds. And, moving a node doesn’t change its uri, and won’t result in broken links on your site.

Any thoughts?

Strongly agree.

Profile
 
 
Posted: 20 April 2010 07:00 PM   [ Ignore ]   [ # 17 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1433
Joined  03-05-2008

This is looking good and i am very glad to see this released on an open license… congrats…
In reference to the pages module, i for one use it in kind of the opposite way. i use it to create short urls for pages - typically things like converting /pagestemplategroup/about_us/ to simply /about/ for example - therefore i do like pages module.
However, in your module i thought i saw the option for a hardcoded URL - so i could just enter the pages module uri into this and job done…

if i am mistaken, and did not see a URL override option then this would be handy. often my clients need to ad external links to menus, hence the need to do this.

again though - looks great. thanks.

 Signature 

ModeTen Designs - @ModeTen - Stock Photos & Vectors

Profile
 
 
Posted: 20 April 2010 11:15 PM   [ Ignore ]   [ # 18 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  446
Joined  01-14-2006
nevsie - 20 April 2010 11:00 PM

if i am mistaken, and did not see a URL override option then this would be handy. often my clients need to ad external links to menus, hence the need to do this..

There is a URL Override field in there which does exactly the above - it’s not for assigning an url to the template/url_title in the options above it, which I’m presuming you thought the function was for.

Thanks for the feedback!

 Signature 

Weblog | @iain | Taxonomy for EE2

Profile
 
 
   
1 of 4
1