raintpl3 icon indicating copy to clipboard operation
raintpl3 copied to clipboard

Call function simplest syntax

Open nikmauro opened this issue 10 years ago • 1 comments

Hello i have the function permalink and i want to call this like the following example

example a href="{permalink:(1)}">link /a or a href="{$permalink:(1)}">link /a

it is possible?


function permalink($id){
     // do something...
     return $id; // return something...
}

nikmauro avatar Apr 15 '14 06:04 nikmauro

When they have added #167, you can use {1|permalink} If you want a dynamic function call, you can just use a variable:

<a href="{$post_id|permalink}">link</a>

Xesau avatar Dec 31 '14 20:12 Xesau