It would be great to have the option to hyphenate spaces in in Field Configuration options.
I am using Views to create SEO links (eg: sitename.com/state-name/city-name) from taxonomy term tokens. I do it this way: /[name]/[field_city_n]?tid=[tid] . These tokens are: term-parent & term-name.
Some taxonomy terms contain multi-word terms (eg: New South Wales). Pathauto converts the spaces to hyphens. Links generated for multiword terms 404. All that is missing is the hyphen - perhaps the pathauto behavior could mirrored in Views?
Perhaps the option to convert spaces to hyphens in my fields would be a good addition to Views? Doesn't seem too different from "Remove Whitespace" or "Strip HTML".
Comment | File | Size | Author |
---|---|---|---|
#10 | views-n1196058-10.patch | 13.3 KB | DamienMcKenna |
| |||
#8 | interdiff-6-8.txt | 740 bytes | recrit |
#8 | 1196058-provide-additional-rewrite-options-tolower-punctuation-8.patch | 13.53 KB | recrit |
#6 | 1196058-provide-additional-rewrite-options-tolower-punctuation-6.patch | 13.53 KB | mukhsim |
Comments
Comment #1
BarwonHack CreditAttribution: BarwonHack commentedOh, and perhaps "Convert to lowercase" would also be nice?
Comment #2
cartagena CreditAttribution: cartagena commentedI'm also struggling with the same issue. Views is a great module, this is the first thing I haven't been able to figure out (not being a programmer) Thanks!
Comment #3
MrPaulDriver CreditAttribution: MrPaulDriver commentedFollowing the same principles it would also be most helpful to have Pathauto style treatment of punctuation and symbols. So that Paul's Bike & Skate Shop is rewritten as pauls-bike-skate-shop rather than paul%27s-bike-%26-skate-shop
Given that the requests above appear to have been implemented now, should I post this as a separate feature request?
Comment #4
carajito CreditAttribution: carajito commentedpathauto inside option will be excellent solution.
As implemented by "File (Field) Paths"
Comment #5
moltra CreditAttribution: moltra commentedI also would love the pathauto options in views.
Comment #6
mukhsim CreditAttribution: mukhsim commentedAttached patch provides to_lowercase and replace_punctuation options.
Comment #7
mukhsim CreditAttribution: mukhsim commentedComment #8
recrit CreditAttribution: recrit commentedRe-rolled patch to fix misspelling for "replace_punctuations" which should be "replace_punctuation".
Comment #10
DamienMcKennaRerolled.
Comment #11
DamienMcKennaThis needs an update to views.api.php for the new hook, and I'd like the comment above the drupal_alter() to specifically say "Triggers hook_views_punctuation_chars_alter()."
Comment #12
DamienMcKenna