0
Welcome Guest! Login
0 items Join Now

SOLVED Module class suffix added twice on Custom modules

    • Ali Samii's Avatar
    • Ali Samii
    • Elite Rocketeer
    • Posts: 629
    • Thanks: 2

    SOLVED Module class suffix added twice on Custom modules

    Posted 11 years 1 month ago
    • I'm having an issue which is causing a visual problem for me.

      All Custom HTML Modules are getting the module class suffix added twice.
      <div id="rt-sidebar-a">
          <div class="rt-block pagetitle box6 nomarginleft largepaddingleft nomargintop nomarginbottom nopaddingright nomarginright">
              <div class="module-surround">
                  <div class="module-content">
                      <div class="custom pagetitle box6 nomarginleft largepaddingleft nomargintop nomarginbottom nopaddingright nomarginright">
                          <p>société</p>
                          <h2>Collaborateurs</h2>
                      </div>
                  </div>
              </div>
          </div>
      </div>

      You can see this issue here:

      betelec.ergonomiq.net/societe/collaborateurs

      Adding a border-top: 3px solid @corpColor; to the less for the box6 style, you see a border at the top of the green sidebar-a, and a border immediately above the text.

      How can I solve this?
    • Thank you.

      Ali Samii
  • Re: SOLVED Module class suffix added twice on Custom modules

    Posted 11 years 1 month ago
    • Hi,

      You could/should use a module template override for this :

      1. Copy 'modules/mod_custom/tmpl/default.php' to 'templates/your_template/html/mod_custom/custom.php'

      You can keep the 'default.php' name if you want your update to affect all your custom modules.

      2. Edit your new file :

      Before
       
      <div class="custom<?php echo $moduleclass_sfx ?>" <?php if ($params->get('backgroundimage')): ?> style="background-image:url(<?php echo $params->get('backgroundimage');?>)"<?php endif;?> >
          <?php echo $module->content;?>
      </div>
       

      After
       
      <div class="custom" <?php if ($params->get('backgroundimage')): ?> style="background-image:url(<?php echo $params->get('backgroundimage');?>)"<?php endif;?> >
          <?php echo $module->content;?>
      </div>
       

      We've just removed the display of module class suffix...

      If you've chosen to name your override 'default.php', you have nothing more to do except refreshing your frontend page to check the result.

      If not, follow next step

      3. Edit your custom module in the backend and apply your custom template :
      This image is hidden for guests.
      Please log in or register to see it.


      Save and you should be good.

      Hope this helps,

      Olivier
    • Some useful links :

      Some tips for an efficient process :
      1. When possible, post URL of your website, it's always better to see the problem in REAL
      2. Only one problem per thread please
      3. When problem is solved, just edit your...
  • Re: SOLVED Module class suffix added twice on Custom modules

    Posted 11 years 1 month ago
    • FYI, it's not a bug, it's a feature.

      We did this because every extension handles that a bit different so we created a hook in the modchrome.

      Olivier
    • Some useful links :

      Some tips for an efficient process :
      1. When possible, post URL of your website, it's always better to see the problem in REAL
      2. Only one problem per thread please
      3. When problem is solved, just edit your...

Time to create page: 0.048 seconds