0

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

aneuryzm
  • 63,052
  • 100
  • 273
  • 488
  • How do you use "path auto module to automatically stores images in the projects subfolder"? (Pathauto creates paths (URLs), but does not store anything in folders) Could you explain a bit more how you do this? – Henrik Opel Jun 16 '10 at 22:10
  • combined with CCK fields. So yes, it doesn't store itself, it specifies in which folders to store the files – aneuryzm Jun 17 '10 at 07:14

2 Answers2

3

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.

Community
  • 1
  • 1
Vinicius Braz Pinto
  • 8,209
  • 3
  • 42
  • 60
  • 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 :( – aneuryzm Jun 16 '10 at 17:12
  • so, hooking modules = developing a complete new module ? thanks for link – aneuryzm Jun 17 '10 at 07:17
  • 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 Braz Pinto Jun 17 '10 at 14:17
2

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

cam8001
  • 1,581
  • 1
  • 11
  • 22
  • sorry, where are the pathauto settings ? I cannot find them – aneuryzm Jun 16 '10 at 12:46
  • They are under 'URL Aliases' in the admin menu - admin/build/path/pathauto – cam8001 Jun 16 '10 at 22:10
  • 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... – aneuryzm Jun 17 '10 at 07:16