Page 1 of 1

A little idea about tpl_cm_pi_modular.php

Posted: Tue May 23, 2023 10:00 pm
by beerbee
Hi,
I did the following little change in my own template to
includes/modules/content/product_info/tpl_cm_pi_modular.php
from

Code: Select all

   if ($GLOBALS['Template']->has_blocks($block_name)) {
        echo '<div class="col-sm-' . $v . '">';
          echo '<div class="row">';
to

Code: Select all

if ($GLOBALS['Template']->has_blocks($block_name)) {
        echo '<div class="col-sm-' . $v . '">';
          echo '<div class="row ' . $k . 'style">'
where <div class="row ' . $k . 'style"> gives me the option to have individual css classes for each slot. .astyle .bstyle..

I use it for hcsticky which will keep the gallery sticky on scrolling down, but i guess it could be useful in other ways too.

Kind regards
Christoph

Re: A little idea about tpl_cm_pi_modular.php

Posted: Tue May 23, 2023 10:19 pm
by burt
It's a nice idea. All the tpl_ files are templatable, so all you would need to do is (eg) drop a copy of

includes/modules/content/product_info/templates/tpl_cm_pi_modular.php

into (eg)

templates/YOUR_TEMPLATE/includes/modules/content/product_info/tpl_cm_pi_modular.php

and then amend that new file in the way you describe. Download the bootstrap5 theme [ viewtopic.php?f=28&t=1882 ] I've been working on to see example of tpl_ files that are overriding the "usual" tpl files.

Re: A little idea about tpl_cm_pi_modular.php

Posted: Tue May 23, 2023 10:50 pm
by beerbee
Hi @burt,

I know, it's just what I did. It is the other great thing about phoenix, besides being quick and slim enough even on shared hosting, to be able to do so much customisation with themes

Kind regards
Christoph