Node with multiple terms + views + multiple URL aliases

goffer - June 30, 2009 - 19:22
Project:Pathauto
Version:6.x-1.1
Component:User interface
Category:support request
Priority:normal
Assigned:goffer
Status:active
Description

I posted this in the general forum and thought maybe I would get more action here:

My client is a construction company and they want to be able to easily add their "Projects" to their website. They have different categories of projects. One called Structural and one called General Construction along with different types of each. I set up a content type called "Projects" and set up a vocab like this:

Structural
--Cast In Place
--Civil
--Design Build/Assist
--Commercial/Institutional
--Military
General Construction
--Education
--Civic
--Medical
--Sports/Recreation

When they add a project sometimes it belongs to multiple types (or terms in drupal language) so I checked marked the Taxonomy option "Multiple select"

I set up a view for each term so that when they go to the "Cast In Place" or any other type there is a bucket on the left side displaying all the the content for that specific type making it easy to just click through all the projects... like so:
http://70.164.99.251/structural/cast-place/egyptian-lofts

I set up path auto like so on the "Projects" content type:
[vocab-raw]/[term-raw]/[title-raw]

Everything works perfectly... until I select more then one term.

If I select "Cast In Place" and "Design Build/Assist" for a specific node it only generates one URL. It shows up in both buckets but say that I'm in the "Design Build/Assist" part of the website and click on the project. Instead of going to:
www.domain.com/structural/design-buildassist/project-name

it'll go to:
www.domain.com/structural/cast-place/project-name

thus moving me away from the Design Build/Assist part of the website.

What I want is the view bucket to hold

www.domain.com/structural/design-buildassist/project-name

for the design build/assist view bucket and...

www.domain.com/structural/cast-place/project-name

for the cast in place view bucket.... both of which linking to the same node (to make is easier when it comes time to edit)

Hopefully this all makes sense... I have a throbbing headache and am out of idea's.

Thanks!

#1

MXT - July 31, 2009 - 11:05

Subscribe.

I have the same problem.

if, in addition to "multiple select", there were a pathauto option like "create URL alias for every TOP term selected" (pointing to the same node) It would be perfect!

MXT

#2

redben - October 20, 2009 - 12:56

Yeah...i'm looking for the same functionality...i kind of symlinks

#3

redben - October 20, 2009 - 12:59

I love google :D
Check out this module that seems to answer my (eventually your) needs :
http://drupal.org/project/nodesymlinks

#4

redben - October 20, 2009 - 13:02

Talked too fast. Actually it solves part of the problem, but not everything...

#5

goffer - November 12, 2009 - 00:29

Thank you very much for the link... I'll be checking it out.

#6

markDrupal - November 12, 2009 - 17:58

Have you ever thought about using views instead of pathauto?
In views you can set parts of the URL to be arguments. So you would create a view where the first argument is the taxonomy term and the second argument would be the node title

http://www.domain.com/[argument-1]/[argument-2]
http://www.domain.com/[term]/[node-title]

Then you set the view argument options to: 'show all nodes when no argument present'

So if you go to
www.domain.com/design-buildassist/project-name

You will get all all nodes with the 'design-buildassit' term attached and the node title 'project-name'

if you go here:
www.domain.com/cast-place
You will get all the nodes taged with the 'cast-place' term

I'm not certain if you can use the whole category path in the url, so this url may not work.
www.domain.com/structural/design-buildassist/project-name

But if you can deal with using 2 arguments, term and node title, you could use the views module to accomplish something similar to what you are trying to do with pathauto.

#7

markDrupal - November 12, 2009 - 18:04

Giving this a little more thought, you might only need one argument in your view

http://www.domain.com/products/[argument-1]
so your URL would be like:
http://www.domain.com/products/[term]

then set path auto for those nodes to
products/[term]/[node-title]

#8

goffer - November 13, 2009 - 00:47

Thanks Mark! I'll look into it... I really appreciate the ideas :)

 
 

Drupal is a registered trademark of Dries Buytaert.