Jump to content


Public support for most advanced custom contents module for PrestaShop. With our html box module you can add your contents to all available positions in prestashop, even non-default hooks. Our addon has many appearance conditions and support of smarty templates language. Its definitely one from the most powerful custom contents addon for prestashop
Photo

Display block on selected URL with filter variable

attribute selected url faceted search category

  • Please log in to reply
No replies to this topic

#1 Virgilio

Virgilio

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 15 November 2023 - 04:32 PM

Hello,

I would like to know if there is a way to display custom text on a Regex URL or on a URL with faceted search. 

I tried this, but I couldn't make it work: https:\/\/mydomain.it\/([^\/?produttori=obsessive).

I would like to create custom text on certain categories with the same attribute.

For example, display the same text for the following URLs:

mydomain.it/category1/?manufacturer=obsessive

mydomain.it/category2/?manufacturer=obsessive.

Is there a way to achieve this?

 

Tia

 



#2 Janet scott

Janet scott

    Newbie

  • Members
  • Pip
  • 0 posts

Posted 30 May 2025 - 05:49 AM

Yes, you can achieve this by checking the URL parameters using JavaScript. For example, use:

javascript
if (new URLSearchParams(window.location.search).get('manufacturer') === 'obsessive') {
document.getElementById('custom-text').innerText = 'Your custom text here';
}

Place this script on relevant category pages and add a <div id="custom-text"></div> where you want the text to appear.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users