Page 1 of 1
Set Content Module per Template
Posted: Sun Sep 28, 2025 8:58 am
by azpro
Hi all,
After updating to 1.1.0.6. I started to explore more of the templating possibilities. Easily switching between templates brought me to a question.
Is it possible to have a Content Module (eg carrousel) only assigned to a particular template? So duplicate and rename the carrousel stuff and assign to template.
Tnx! Arjan
Re: Set Content Module per Template
Posted: Sun Sep 28, 2025 9:22 am
by burt
Upload the TPL file of the Module to the templates.
EG:
/includes/modules/content/index/templates/tpl_carousel.php
TO `first_template`:
/templates/first_template/includes/modules/content/index/tpl_carousel.php
AND TO `another_template`:
/templates/another_template/includes/modules/content/index/tpl_carousel.php
Now you have the Carousel being displayed by two separate templates.
If you do not want that Carousel in `first_template`, just change the `first_template` file to "blank" (ie the file IS there [thus overriding the Core or Addon File], but has NO content. If it has NO content...it won't show.
That's a way, it might not be the perfect way or the only way.
I don't know if there might be an addon that makes this process easier?
Re: Set Content Module per Template
Posted: Sun Sep 28, 2025 9:23 am
by burt
Importantly, notice that when you upload a TPL file to a Template it does not need the /templates directory;
EG:
/includes/modules/content/index/templates/tpl_carousel.php
TO `first_template`:
/templates/first_template/includes/modules/content/index/tpl_carousel.php <-- /templates not needed here