Question

If there's a better way to achieve what I want to do, please point that out.

I have a multilingual application in CakePHP, and I want to keep the language parameter in each page. What I want to do, is to override the default link function to put a language parameter on each link, unless the language parameter is specified in the input array. I know how to do this, I just need the instructions on how to override the class so I don't have to change my code in lower levels.

Was it helpful?

Solution

Extend your HtmlHelper as MyHtmlHelper and use aliasing to map it back to Html namespace: http://book.cakephp.org/2.0/en/views/helpers.html#using-and-configuring-helpers

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top