Needs review
Project:
Wikitools
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Oct 2010 at 15:51 UTC
Updated:
14 Feb 2011 at 18:57 UTC
For the site I am working on, I wanted Wikitools to automatically put capitalization on the words of the page title it generates from the URL. I have all lowercase URLs, but I want the page titles to include capital letters. The accompanying patch introduces a setting that lets the site administrator choose whether to leave the page as is (as it would be with the current code), turn the first letter of the title into a capital, or turn the first letters of all words in the title into capitals.
This is the first patch I submit to any Drupal module, so bare with me. Especially, I am unsure whether the format is exactly right, I created it from my Git repository.
| Comment | File | Size | Author |
|---|---|---|---|
| 0001-Introducing-control-over-page-title-generation.patch | 2.53 KB | eelkeblok |
Comments
Comment #1
sadist commentedI just discovered this module, still playing around with it. Your patch sounds great, I will definitely want to use it.
Just my two cents, will it be difficult for you to have another function that will make some words to be small letter? E.g. and, is, was, etc.
So page title will be like "Some and Whatever Here"
Comment #2
eelkeblokThe patch is now using two standard PHP functions (ucfirst and ucwords). Filtering on certain words will make the patch a lot more complicated. Not just technically, but choices would also have to be made like, will this be a fixed set of words? If so, how to handle different languages? If not, should a static filter list be used? In that case, again, how do you handle multi-language sites? I wonder if this is worth the trouble, to be honest.
Comment #3
sadist commentedouh! I never thought about other languages, so you're right and I do agree with you.
Comment #4
jpmckinney commentedLooks good to me. Up to maintainer if it is a desirable feature.
Comment #5
jpmckinney commented