Jump to content

Using sprintf in smarty


Recommended Posts

Hi there. I'm a newbie at smarty and need a little bit of help (using PS 1.6.0.9)  :

 

In smarty template i have the following variable:

{assign var ="link_url" value = $link->getCmsLink(8)}

I want to sprint a string with that link,  using {l s='... so i tried:

{l s='I've read and understood the %s terms of policy %s' sprintf=['<a class="fancybox" href="$link_url">', '</a>'] }

or 

{l s='I've read and understood the %1$ terms of policy %2$' sprintf=['<a class="fancybox" href="$link_url">', '</a>'] }

with no success, as <a tag> is stripped in sprintf

 

What is the right way to do that?

 

Thx in advance!

 

 

 

Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...