A little idea about tpl_cm_pi_modular.php

Open to all! Ask other shopowners for help.
Post Reply
beerbee
Member
Posts: 48
Joined: Mon Oct 26, 2020 4:56 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 5 times

A little idea about tpl_cm_pi_modular.php

Post 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


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4561
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 422 times

Re: A little idea about tpl_cm_pi_modular.php

Post 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.
I am not here to build for you.
I am here to build with you. Let's help each other.
beerbee
Member
Posts: 48
Joined: Mon Oct 26, 2020 4:56 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 5 times

Re: A little idea about tpl_cm_pi_modular.php

Post 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


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply