1

I am learning smarty. I want to assign a link to a variable:

{assign var="book_link" value="`$smarty.capture.$name` nofilter"}

I want to use truncate to produce that book_link, so i use

<div class="title-book">{$book_link|truncate:50}</div>

But it did not work.

anothernode
  • 5,100
  • 13
  • 43
  • 62

1 Answers1

0

just change the double quotes from value and try this

{assign var="book_link" value=`$smarty.capture.$name` nofilter}
sreechith srk
  • 146
  • 12