module style doesn't work

Everything to do with Joomla! 2.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
Rio1105
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Nov 16, 2012 4:52 pm

module style doesn't work

Post by Rio1105 » Fri Nov 16, 2012 5:04 pm

Hey all,

I just created my own template with the following content:

Code: Select all

<files>
		<folder>css</folder>
		<folder>images</folder>
		<folder>js</folder>
		<folder>html</folder>
		<filename>index.html</filename>
		<filename>index.php</filename>
		<filename>template_thumbnail.png</filename>
                <filename>navicon.ico</filename>
		<filename>templateDetails.xml</filename>
</files>
I then used following module in index.php: <jdoc:include type="modules" name="col1" style="ccmi" />

and I put this code

Code: Select all

<?php
    function modChrome_ccmi( $module, &$params, &$attribs ) {
        if (isset( $attribs['headerLevel'] ))
        {
            $headerLevel = $attribs['headerLevel'];
        } else {
            $headerLevel = 3;
        }     
        if (isset( $attribs['background'] ))
        {
            $background = $attribs['background'];
        } else {
            $background = 'blue';
        }       
        echo '<div class="' .$params->get( 'moduleclass_sfx' ) .'" >';      
        if ($module->showtitle)
        {
            echo '<h' .$headerLevel .'>' .$module->title .'</h' .$headerLevel .'>';
        }   
        echo '<div class="' .$background .'">';
        echo $module->content;
        echo '</div>';
        echo '</div>';
    }
    ?>
in here: /htdocs/joomla/templates/ccmi/html/modules.php.

However, for some reason my module style does not change. Can anyone tell me why?

Regards

User avatar
cheetooh
Joomla! Explorer
Joomla! Explorer
Posts: 259
Joined: Tue Sep 19, 2006 10:51 am
Location: Malaysia
Contact:

Re: module style doesn't work

Post by cheetooh » Sat Nov 17, 2012 5:18 am

I have tried your codes and it works. You may try to clear cache at the backend: Site =>Maintenance => Clear Cache
"Whether you're a programmer or a seamstress, it's all about new techniques, simplifying old techniques, and consolidating steps. Making things go faster -- but not worse. Better."
— Martha Stewart for Wired

Rio1105
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Nov 16, 2012 4:52 pm

Re: module style doesn't work

Post by Rio1105 » Sat Nov 17, 2012 9:51 am

I cleared cache but it still doesn't work. I don't see any formating in my modules. Not even when I change my current ccmi file in dic htm/modules.php with one of the joomla standard modules.php from other templates.

When I use modChrome_beezTabs from beez5 template, I get some weird output (see attachment). As you can see, there is not even a line break (text is cut on the right), nor is there any kind of tab (just a list in orange with hyperlink).
You do not have the required permissions to view the files attached to this post.

User avatar
cheetooh
Joomla! Explorer
Joomla! Explorer
Posts: 259
Joined: Tue Sep 19, 2006 10:51 am
Location: Malaysia
Contact:

Re: module style doesn't work

Post by cheetooh » Sat Nov 17, 2012 1:29 pm

is it possible for you to show me what is your expected result?
"Whether you're a programmer or a seamstress, it's all about new techniques, simplifying old techniques, and consolidating steps. Making things go faster -- but not worse. Better."
— Martha Stewart for Wired

drilippi
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Sep 08, 2011 3:13 pm

Re: module style doesn't work

Post by drilippi » Thu Oct 23, 2014 4:52 pm

Hello Rio1105,

I'm having a similar problem: http://forum.joomla.org/viewtopic.php?f=619&t=862285

Did you solve your problem?


Locked

Return to “Templates for Joomla! 2.5”