开发者

drupal: [title] token... not filtered?

开发者 https://www.devze.com 2023-01-03 11:23 出处:网络
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'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] 开发者_Python百科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


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号