The Joomla! Forum ™






Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Dec 20, 2011 10:16 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Feb 09, 2009 10:35 pm
Posts: 13
Hi there

I have customized the Atomic template and am having trouble with some module chrome.

In the template directory html/module.php i have this function:

Code:
function modChrome_footer($module, &$params, &$attribs)
{
   if (!empty ($module->content)) : ?>
      <?php if ($module->showtitle) : ?>
         <div class="footer-module<?php echo $params->get('moduleclass_sfx') ?>">
            <h6><?php echo $module->title; ?></h6>
      <?php endif; ?>
      <?php echo $module->content; ?>
         </div>
   <?php endif;
}


My problem is that the code
Code:
<?php echo $module->content; ?>
inserts my content wrapped in a div which has
Code:
<?php echo $params->get('moduleclass_sfx') ?>
applied to it. So the resultant html output looks like this:

Code:
<div class="footer-module moduleclassFromCMS">
    <h6>titleHere</h6>
   <div class="module moduleclassFromCMS">
      Module content here
   </div>
</div>


See I'm getting a double up!

How do i stop
Code:
<?php echo $module->content; ?>
from inserting the Custom Class specified from the Module in the CMS in the wrapping <div>??

Thank you for reading ;D


Top
 Profile  
 
PostPosted: Wed Dec 21, 2011 11:02 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Oct 04, 2011 2:26 pm
Posts: 154
Location: Dublin, Ireland
It's likely the module's own template is inserting the additional div and moduleclass_sfx

Try overriding module output.
http://docs.joomla.org/How_to_override_ ... omla!_core

_________________
http://bigbang.ie/
https://plus.google.com/113859143467603328328
@bigbangireland


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 



Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group