1

I'm developing a Prestashop-based website locally. I'm configuring the "slider" module (homepage image slideshow), and it is asking me a URL for each picture. I would like each picture to redirect me to the related category page when clicked on. However, how to write that URL? Maybe I could write http://localhost/category.php?id_category=5 ... but it won't work when my website will be online. How to avoid hardcoded url? By using Smarty tag "{$base_dir}"? I tried several ways... unsuccessfully. Can you please help? Thanks a lot!

nadir
  • 1,223
  • 4
  • 12
  • 21

1 Answers1

1

If you are referring the core "homeslider" module do the following:

Open homeslider.tpl from modules/homeslider replace:

{$slide.url|escape:'htmlall':'UTF-8'}

with:

{$base_dir}{$slide.url|escape:'htmlall':'UTF-8'}

and at the module configuration page for the url instead of:

http://localhost/category.php?id_category=5

add:

category.php?id_category=5
PrestaShopDeveloper
  • 3,110
  • 3
  • 21
  • 30