Jump to content

Create custom link in .tpl


Recommended Posts

Hello,

How can I  create a  button to link to a module called "powerfulformgenerator" with one extra parameter (the product id : $product.id )

Up to now, i have hardcoded the link and it works :

<a class="btn btn-secundary" href='https://example.com/fr/demande-de-documentation?id=1&product={$product.id}'>
  Documentation
</a>

But I would like to use Smarty to generate the (pretty) URL.... 

I have defined a shorcut in "SEO & URL" : "demande-de-documentation", but I don't find the method to call to generate the href value.

 

Link to comment
Share on other sites

Print a link to a Module page

{url entity=’module’ name=$module_name controller=$controller id_lang=$id_lang id_shop=$id_shop params=$params}

Print a Custom Link

{url entity=’sf’ route=$route_format sf-params=$params}

 

  • Like 1
Link to comment
Share on other sites

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...