get module link in tpl + prestashop 1.7 code example

Example: get module link in tpl + prestashop 1.7

<strong>Prestashop 1.6</strong> : {$link->getModuleLink()}
<strong>Prestashop 1.7</strong> : {url entity='module' name='myModule' controller='myController' params = ['paramKey1' => $paramValue1, 'paramKey2' => $paramValue2]}
<strong>Example</strong> : {url entity='module' name='marketplace' controller='productupdate' params=['edited' => 1, 'id' => $id]}
 
<strong>Prestashop 1.6</strong> : {$link->getPageLink()}
<strong>Prestashop 1.7</strong> : { url entity='myPageName' params = ['paramKey1' => $paramValue1, 'paramKey2' => $paramValue2]}
<strong>Example</strong> : { url entity='my-account' params=['edited' => 1, 'id' => $id]}
 
<strong>Prestashop 1.6</strong> : {$link->getCategoryLink()}
<strong>Prestashop 1.7</strong> : {url entity='category' id=$id_category id_lang=$id_lang}
<strong>Example</strong> : {url entity='category' id=3 id_lang=2}
 
<strong>Prestashop 1.6</strong> : {$link->getCmsLink()}
<strong>Prestashop 1.7</strong> : {url entity='cms' id=$id_cms id_lang=$id_lang}
<strong>Example</strong> : {url entity='cms' id=3 id_lang=2}
 
<strong>Prestashop 1.6</strong> : {$link->getCatImageLink()}
<strong>Prestashop 1.7</strong> : {url entity='categoryImage' id=$id_category name='imageType'}
<strong>Example</strong> : {url entity='categoryImage' id=3 name='home-default'}

Tags:

Misc Example