stefan Posted January 29, 2014 Share Posted January 29, 2014 Hi folks, this question based on http://processwire.com/talk/topic/5414-selector-find-page-reference-help/?p=52292 I have added a few lines to the configuration of the module "pagename". Especially for the German umlauts ("ö" > "oe"...). By Admin > /filter/groessen Great. $sanitizer->pageName('Größen',true) > "grossen" Wrong.. should be "gr*oe*ssen". What is the secret here?After a look around the Sanitizer::pageName method, i realized that the second argument isn't only a boolean value. The second argument should be "2" (constant "translate").$sanitizer->pageName('Größen, Sanitizer::translate); // "groessen" Is this dependent on a special thing (multilanguage support?) or just forgotten in the documentation (/api/variables/sanitizer/)? Thanks. Adios, Stefan Link to comment Share on other sites More sharing options...
Soma Posted January 29, 2014 Share Posted January 29, 2014 It would be correct: $sanitizer->pageName("Größen", Sanitizer::translate); No it's not dependent on special thing. It's used to translate titles to the name. Nothing to do with translations. This was added at some point around 2.3 after lots discussion and isn't documented on API section (yet) but on cheatsheet http://cheatsheet.processwire.com/?filter=pagename. 4 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now