You are not logged in.
Say I make use of 'replace' plugin to for example get rid of 'http://' from an url.
I would do that this way:
{$url|replace:'http://':''}But this doesn't work as the compiler throws an exception saying that the 2nd argument is missing.
Also, I tried several other options that according to the docs probably should work (http://wiki.dwoo.org/index.php/Functions:replace).
{$url|replace:array('http://', b):array(a, b)}produces "Argument 2/replace missing for replace"
{$url|replace:array('http://'):array(b)}produces "Argument 2/replace missing for replace"
{$url|replace:'http://':array(b)}the output is 'Arraywww.testurl.com'
Offline
Thanks, I will look into those. Although to be honest, the |modifier syntax is not very well supported and quite complex to improve, so I would recommend calling those like {replace $url "http://" ""} and similar, I'm not saying it will fix everything in this case, but it might help.
Offline
Alright, it's all fixed in SVN, with $url="http://test.com" they return :
test.com => OK
atest.com => OK
btest.com => OK
Notice: Array to string conversion
Arraytest.com => OK given the fact your example was invalid, but parsing is fine.
FYI, the problem with the three last ones was that recursive calls (i.e. here you're calling array within a modifier call) didn't work with $var|modifier, only "string"|modifier, which is why my example in the documentation worked, anyway they both work now.
The first issue was a mistake in some regex, again applying only to modifiers on variables. It had .+ instead of .*, so it couldn't be empty.
Offline