Menu Close
    Start a Project Request quote Reading list Switch to dark mode

    How to use {url} for links creation on tpl files in Prestashop 1.7

    In this blog, we will learn new standards of links creation on tpl files in Prestashop 1.7 .

    In Prestashop 1.6 we used {$link} variable on tpl files and we created links on tpl files by calling different link creation methods from $link object.

    But in Prestashop 1.7, a new standard has been set to create links on tpl files. Now we will use {url} for different kind of links creation on tpl files in Prestashop 1.7.

    Let’s understand it with some examples to know how to replace {$link} of Prestashop 1.6 with {url} in Prestashop 1.7 –

    So this is how you can use {url} in Prestashop 1.7 for links creation in tpl files.

    Note-  {url} is directly linked to the getUrlSmarty($params) in the “classes/Link.php” . So you can check this function for more information on links creations iwth {url}.

    You can also take a reference on this topic by visiting the following link –

    Reference –

    . . .

    Comments (3)

    Add Your Comment

  • Ivan

    A third party company holds duplicate data of the products from our Prestashop (1.6) site (they are a kind of comparison site). One of the services they offer is a Datasheet download of the specifications of any given product in PDF format. What I want is a link on each individual product page which, when clicked, will download the PDF in the users browser.

    They’ve given me the following link to place – presumably in the product.tpl file – to enable the facility.{$partNumber}

    Could you advise me how to implement that with Smarty please.


    • Mehul Gupta

      Please raise a ticket at so we can discuss the possibility of customizing it for you.

      Thanks & Regards

  • Andrea Testa
    Ty 😉
  • Back to Top
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again