Tuesday 05 October 2010 12:45:27 am
So I had another go at custom URLs, and while the URL change worked, you cannot use a '/' as part of the URL that gets stored in the ezurlalias_ml table - it gets replaced somewhere in the eZURLAliasML class. I tried to force it in my filter class using an encoded string (%2F I think) but that's just getting really 'hacky' and didn't work anyway simply becuase the '%' symbol gets removed as well. @Abdelkader, you're right - any such update to a node will result in each "directory" having the same suffix, which is why I wanted to use a slash. I see that in ezurlaliasml.php there is a static class method "sanitizeURL" which seems like it's the one stripping the trailing slashes, but I tried hacking it and overriding it, by removing the call to trim() but still no luck. My partner - who also works in I.T. - suggested using a separate rewrite rule in .htaccess for each directory. But that means manually adding a new rule every time a directory is created. I guess I could code something up that automatically wrote a new rule to .htaccess each time a container object was created, but am not sure where to start looking - or even if it's just a bad idea. I'm really stuck.
Thanks for your time folks Russell
Russell Michell, Wellington, New Zealand.
We're building! http://www.theruss.com/blog/
I'm on Twitter: http://twitter.com/therussdotcom
Believe nothing, consider everything.
|