Friday 03 March 2006 6:21:56 am
I try to implement a php operator, but without success. The only documentation I could find about it is a comment in template.ini
What I need is a string replace function, like the php function str_replace. So I added this to /settings/override/template.ini.append.php:
[PHP]
PHPOperatorList[replace]=str_replace
I hoped that something like this would work to create a url to the current node in another siteaccess, for a multilingual site (any other suggestions also welcome!):
{$node.url|ezurl(no)|replace('/eng/','/deu/')}
but the result is the same as without the replace() operat or. I also tried this:
{replace('/eng/','/deu/',$node.url|ezurl(no))}
but then the result is 'Array'.
|