user1760965
user1760965

Reputation: 11

From php to smarty line of code?

So I have a php line of code that I'm trying to convert to Smarty. I've been able to convert the variable but the small syntax before it I'm having trouble with. Bellow are both syntax, how do I add the link_it within Smarty? Thanks in advance.

PHP Code

<span class="commentText" >
    '.link_it($com['comment']).'
</span>

Smarty code

<span class="commentText" >
    {$com.comment}   
</span>

Upvotes: 0

Views: 29

Answers (1)

phuc77
phuc77

Reputation: 6915

You can call your PHP function as a modifier so long as security isn't enabled.

<span class="commentText">
    {$com.comment|link_it}
</span>

Upvotes: 2

Related Questions