views:

38

answers:

2

hi,

I'm using path auto module to automatically stores images in the projects subfolder. I'm using the [title] token and I had a unpleasent surprise: the title "abc / dce", creates 2 folders.

I was not expecting this because in the pattern descrition, [title] is clearly distinguished by [title-raw].

[title] Node title
[title-raw] Unfiltered node title. WARNING - raw user input.

So, how can I fix this issue, I would like to use the title I have in the url "abc-dce"

thanks

+3  A: 

These tokens aren't defined by Pathauto, but by the Token module. If you want a token that will give you a stripped down version of the node title, you can create it using the hooks provided by Token. The answer to this question may also help.

Vinicius Pinto
mhm, I cannot understand where I should place token_replace to replace a module. Is there a complete tutorial somewhere to hook modules ? I read some drupal doc but it is confusing :(
Patrick
http://drupal.org/developing/modules
Vinicius Pinto
so, hooking modules = developing a complete new module ? thanks for link
Patrick
Yeah, the idea is to create custom modules that will imlpement Drupal hooks to change some feature or implement a new one. This link explaing this better: http://api.drupal.org/api/group/hooks
Vinicius Pinto
+2  A: 

You can also work with the punctuation settings of the pathauto module to deal with the / character before it causes problems.

cam8001
sorry, where are the pathauto settings ? I cannot find them
Patrick
They are under 'URL Aliases' in the admin menu - admin/build/path/pathauto
cam8001
oh ok, I've checked these settings, I didn't know it was path auto settings, since it is written URL alia in the menu. So, the problem with these settings is that there is not "/" in the Punctuation settings!! Only back-slash...
Patrick

related questions