0
Welcome Guest! Login
0 items Join Now

ROCKETTHEME IS CLOSING ON JUNE 30, 2025. As a thank-you to our community, enjoy 50% off all themes with the promo code THANKYOU before we shut down. Read our Farewell Blog Post for more details.

How can I apply a module class variation ?

  • How can I apply a module class variation ?

    Posted 16 years 4 months ago
    • Hello there,
      I have a template based on Firenzi.
      I can easily create custom modules then set the Module Class Suffix in the Module parameters section accordin to the desired values that correspond to variations in the template I'm using.

      Now I coded a new module, which I called mod_devnews and I tried to apply the desired module style by inserting the div tag in the rendering phase :

      file :mod_devnews/tmpl/default.php
      <?php defined( '_JEXEC' ) or die( 'Restricted access' ); ?>
      <div id="module-hilite3">
      <?php
      foreach ($list as $news) {
          ?>
          <p>
              <?php require(JModuleHelper::getLayoutPath('mod_devnews', 'news')); ?>
          </p>
          <?php
      }
      ?>
      <br /> <a class="readon" href="index.php?option=com_content&task=view&id=18&Itemid=35">All news items...</a>
      </div>

      Now, this is the resulting image on the front page where the module is displayed :
      This image is hidden for guests.
      Please log in or register to see it.


      When I visulize the html code of the resulting page I note that the <div> tag comes after the module title, which is normal according to what I did, but it is really strange that the borders didn't even appear within the module content.

      Anyway I'd like to have a similar behavior to the module to the left (titled Easy Profiler is available) and hence need to know how I can tell Joomla framework to insert that famous div before the title of my "Development News" module.

      Thank you in advance.
      Ahmed.
    • --
      Ahmed Charfeddine
      Chess Programmer, www.potatosoftware.com
      Batch Document, on the road : www.batchdocument.com
  • Re: How can I apply a module class variation ?

    Posted 16 years 4 months ago
    • adding the following code in the beginning of the module code

      $params->set('moduleclass_sfx','module-hilite1');

      does help in vain.

      Any ideas ? :cry:
    • Last Edit: 16 years 4 months ago by Ahmed Charfeddine.
    • --
      Ahmed Charfeddine
      Chess Programmer, www.potatosoftware.com
      Batch Document, on the road : www.batchdocument.com
  • Re: How can I apply a module class variation ?

    Posted 16 years 4 months ago
    • Pbm solved by adding a new option in the xml file :

      ..
      <params>
      <param name="moduleclass_sfx" type="text" default=""
      label="Module Class Suffix"
      description="A suffix to be applied to the css class of the module
      (table.moduletable), this allows individual module styling" />

      </params>
      ...
      :cheesy:
    • --
      Ahmed Charfeddine
      Chess Programmer, www.potatosoftware.com
      Batch Document, on the road : www.batchdocument.com

Time to create page: 0.067 seconds