On Jan 3, 2008, at 1:52 AM, Stephen Hansen wrote:

>
> Is there a way to have spaces automatically translated to  
> underscores like MediaWiki does?
>
> Most wikis follow the CamelCase convention for creating page names.   
> Use of spaces is not valid in URLs nor in CamelCase.
>
> Yes, well, most is not all; and CamelCase is deeply irritating to  
> certain corporate folk I have to deal with.
>
> So if you are typing into the address bar ' http://address/trac/wiki/This 
>  or That', it redirects to 'http://address/trac/wiki/This_or_That ',
>
> Apart from URLs with spaces in them being invalid (spaces should be  
> escaped to %20), you can probably do this with a rewrite rule.
>
> I know they are invalid; and they are escaped to %20. MediaWiki,  
> however, automatically does a redirect to convert a url with %20's  
> into a URL with underscores. Converting a large MediaWiki site to  
> trac makes this a very, very desirable thing.
>
> I'll experiment with some rewrite rules to accomplish the end. Thanks.
>
> and more importantly, if you create a page name called ["This or  
> That"] it will link to This_or_That?
>
> Take a look here, http://trac.edgewall.org/wiki/WikiPageNames on  
> naming pages and linking to them.
>
> I don't see how this helps. I know how Trac names pages, and the  
> ways to link to Trac pages. I'm talking about [wiki:"This or That"]  
> being a link to [wiki:"This_or_That"].

No, there is nothing in Trac that does this since wiki page names have  
no semantics attached to them (camel case is only used for automatic  
links, nothing more). You could certainly make a plugin to do this  
with redirects though. You could probably also do something hilarious  
with mod_rewrite if you use Apache.

--Noah

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to