Closed (won't fix)
Project:
Pathauto
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Jul 2008 at 17:54 UTC
Updated:
28 Oct 2008 at 11:19 UTC
It would be nice to be able to replace the ampersand (&) with the word 'and' such that, for example, a page "Cats & Dogs" translated to www.example.com/cats-and-dogs rather than www.example.com/cats--dogs or something similar. That would be a more meaningful replacement which would preserve the "interpret-ability" of the resulting URL. (Thanks for the great module!)
Comments
Comment #1
gregglesI don't think this should be in Pathauto itself and rather chould be done on a per site basis via something like #212208: allow other modules to affect strings (to help with custom accent/string replacement).
Comment #2
Freso commentedAs Greg said, for 6.x-2.x, it will (hopefully) be possible to implement custom hooks to do such jobs. Until then (6.x-1.x and earlier), you can enable transliteration and add the line "
& = and" to the i18n-ascii.txt file (and for 6.x-2.x, you should be able to add it to Transliteration's tables).Comment #3
joshuajabbour commentedJust an update to alert other users that the instructions in #2 won't work.
"&" is a reserved character in .ini files (along with {}|~![()" and some php reserved words), so this isn't a possible solution. I've tried a few other ideas, but nothing has worked so far. The only solution AFAIK is patching the module to add support, which has been turned down by the maintainers before, so I don't think this is possible with Pathauto 1.x.
Comment #4
greggles@joshua.jabbour - you mean that some of the instructions in #2 don't work.
I'm more confident that the 2.x branch can successfully use transliteration to do this.
Comment #5
Freso commentedActually, if the transliteration is done after the character stripping, it might not work... I haven't looked at the code to see when it happens, so this might not be an issue. Just thought I ought to mention it. :)