views:

15

answers:

1

I have a node called artists. It has a field called shortname. I want to have it so that when I add an artists with shortname = 'foo' you can navigate to http://bar.com/foo/ and it will show that artist's node.

What's the magic configuration in pathauto to make this happen?

+1  A: 

You need The path auto which requires the token module. You'll need to set up your path using the [title-raw] token. Which should be used with care as node titles could inject bad stuff into your URLs.

It's not a good idea to have http://example.com/[title-raw]. You'll end up with possible name collisions. Try http://example.com/artist/[title-raw]

Rimian
I can't use title, it needs to be a field called shortname. Is there a way to do that and constrain it to items of type artists?
KevinM
If the ckk module is installed then you'll have a very long list of cck-field-tokens. One of them should be the shortname cck field token (e.g. field_shortname_text-raw). Use it as Kevin suggested instead of the title token and your sould be fine.
mikewink

related questions