CVS edit link for glass.dimly

I have created a small module that allows the user to input custom links for each taxonomy term in a vocabulary, which I have named Taxonomy Custom Paths.

Use case: Taxonomy designates site sections in my site, with the Taxonomy Breadcrumb module being used to provide taxonomy-based breadcrumbs.

The problem is that I have various landing pages, panels that need to be linked to from the taxonomy terms. I need for those taxonomy-based breadcrumbs, as well as other taxonomy terms in the site, to link back to those custom panels.

No other module offers this capability (surprisingly!). I put in a request in the forums about two weeks back. Pathauto allows aliases for taxonomy term listings, and other modules allow programmatic replacement of terms via views or passing arguments to panels. Taxonomy Views Integrator allows linking taxonomy terms to views, and only views. No module, however, allows non-programmatic URLs to be used for taxonomy terms.

This module is simple, and provides a checkbox on the vocabulary edit page which turns Taxonomy Custom Paths on for that vocabulary. If it is enabled for a vocabulary, it provides a textfield on the taxonomy term page with allows one to enter a custom URL.

This module is working and live at http://quixote.org.

I'm a longtime member of the Drupal community, participant in documentation, and Drupal freelancer for nonprofits, but this is my first shot at a module. Up to now I've done only development at the theme layer.

I think this module fills a need and I'd like to maintain it for the longterm.

I hope that this is the first step towards much more involvement and participation, as I learn cvs and pitch in.

Peace,
glass.dimly

CommentFileSizeAuthor
#1 taxonomy_custom_paths.tar_.gz2.95 KBglass.dimly

Comments

glass.dimly’s picture

StatusFileSize
new2.95 KB
MGN’s picture

Thanks for the contribution. I'll be happy to look over the code and give you some feedback (as per your request on #747392: Link taxonomy term to custom panel. I am not sure if you have tried Custom breadcrumbs 6.x-2.x for this? You can produce custom breadcrumbs based on taxonomy terms and vocabularies that link to any kind of page (views, arbitrary urls, panels, and modules pages). I am not sure if this does what you need it to, or if it might be easier to implement within custom breadcrumbs taxonomy, but I'll know more after I review the code.

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Needs work
Issue tags: +Module review

Hello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.

As per previous comment, I am changing the status of this application.

glass.dimly’s picture

MGN,

Thanks much for having a look at this.

Yes, Custom Breadcrumbs can provide links to arbitrary nodes, and I did install that to see if it worked for me. Great module.

However, I needed taxonomy terms as well as breadcrumbs to link to arbitrary paths. You can see what I'm doing at development.quixote.org. Bear in mind the site's still rough around the edges.

Peace,
glass.dimly

glass.dimly’s picture

Any progress on checking out this code?

Thanks,
glass.dimly

MGN’s picture

Sorry for delaying. I have been busy and haven't had too much time to work through it.

I have noticed some minor/normal coding issues

  • some formatting issues with comments - review the coding standards for details on this.
  • t() should not be used in schema descriptions
  • $may_cache is no longer used in hook_menu
  • I wouldn't include the package = Taxonomy line in the .info file. There is only one module here, not a series of modules that needs to be grouped together. Other taxonomy-oriented modules do not have a line like this.
  • missing quotes on line 60 of taxonomy_custom_paths.module?
  • Add CVS tags: ; $Id$ to .info file and $Id$ for the README.txt file

These will be easy to fix.

There is clearly no conflict/duplication with taxonomy breadcrumb or any other breadcrumb modules that I am aware of. It seems like it might be closely related to taxonomy redirect?

From the usage policy

Always make sure there isn't already contributed code that does the same thing as your code. Instead, contact the maintainer of the other project and try to merge the projects into one.

From the taxonomy redirect project page

Taxonomy redirect only uses hook_term_path (http://api.drupal.org/api/function/hook_term_path/6) to modify paths for taxonomy terms, it doesn't actually create path aliases.

This is also the primary hook used by taxonomy custom paths, and it seems very similar to your description except that you mention that

No module, however, allows non-programmatic URLs to be used for taxonomy terms

.

So perhaps I am missing something?

If these modules are related, it might be helpful if you could explain what taxonomy custom paths does that taxonomy redirect does not, and why they should be two separate modules.

glass.dimly’s picture

MGN,

Thank you very much for reviewing my code. It was good practice for me to make it.

Yes, I think you're right, that the module you linked to seems to do what my module does. I was not able to find that module during my search and through my forum post, but it doesn't surprise me that a module like that already exists, because my need seemed pretty common.

I'm going to have to install it and have a look. If it's the case that the functionality is equivalent, then I'll withdraw my module for consideration and migrate my current site onto the Taxonomy Redirect module, and maybe offer to co-maintain Taxonomy Redirect.

The last thing we need on drupal.org is a profusion of identical modules!

Peace,
glass.dimly

glass.dimly’s picture

Yep, the module I wrote does the same thing as
http://drupal.org/project/taxonomy_redirect

So thanks for reviewing the module, but I actually migrated off of my module into Taxonomy Redirect so as not maintain it.

glass.dimly

avpaderno’s picture

Status: Needs work » Closed (won't fix)
avpaderno’s picture

Component: Miscellaneous » new project application
Issue summary: View changes
Status: Closed (won't fix) » Closed (duplicate)
Related issues: +#1030228: glass.dimly [glassdimly]