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!
Asked
Active
Viewed 733 times
1

nadir
- 1,223
- 4
- 12
- 21
1 Answers
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
-
Thanks a lot PrestaShop-Developer.com. It works like a charm! – nadir Nov 25 '13 at 08:38