Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • leisurepublishing Friend
    #140433

    So I am using the following insert to create a custom position for an ad box –

    <jdoc:include type="modules" name="ads-med-rectangle" style="xhtml" />

    The problem though is the rendered code is something like this-


    <div class="moduletable">
    CONTENT
    </div>

    But that class is applied to all module tables which have a border. For this particular position, I don’t want any border so I’d like to add a second class of “ads” so it would look like this-


    <div class="moduletable ads">
    CONTENT
    </div>

    Is that possible? How would I do that? If not possible, is there another solution to give this particular box a different class?

    Thanks!

    Css Magician Friend
    #302024

    Hi leisurepublishing,

    In templates_name/html you find modules.php , you can see code
    [PHP]
    function modChrome_jamodule($module, &$params, &$attribs)
    { ?>
    <div class=”moduletable<?php echo $params->get(‘moduleclass_sfx’); ?>” id=”Mod<?php echo $module->id; ?>”>
    <?php if ($module->showtitle != 0) : ?>
    <h3><span><?php echo $module->title; ?></span></h3>
    <?php endif; ?>
    <?php echo $module->content; ?>
    </div>
    <?php
    }
    ?>
    [/PHP]
    So, you can add your class or change all module class/id in :
    [PHP]
    <div class=”moduletable<?php echo $params->get(‘moduleclass_sfx’); ?>” id=”Mod<?php echo $module->id; ?>”>
    [/PHP]
    And then, in index.php, you use


    <jdoc:include type="modules" name="ads-med-rectangle" style="jamodule" />

    leisurepublishing Friend
    #302072

    Okay, my files were pretty much set up like that already except for the jdoc: reference. I changed the style to jamodule like you suggested and now it is rendering an id=”mod78″ on the particular module in question.

    Will that module always have that id so I can set a style in my stylesheet for it?

    Thanks!

    Css Magician Friend
    #302140

    Hi leisurepublishing,

    yes of course, I think you can remove : id=”mod…” or you set the your style

    cgc0202 Friend
    #302143

    Hi duchh,

    Your suggestion might be the direction to solve a problem that confounded me for quite a while now.

    Where is this located: templates_name/html ?

    I have a related question, but I will place it as a separate, and link it here.

    How do I change the widths of Hot Topic modules
    http://www.joomlart.com/forums/showthread.php?p=125415

    Kindly respond there so that this thread will focus solely on leisurepublishing issue.

    Thanks.

    Cornelio
    ******************
    <em>@duchh 125248 wrote:</em><blockquote>Hi leisurepublishing,

    In templates_name/html you find modules.php , you can see code
    [PHP]
    function modChrome_jamodule($module, &$params, &$attribs)
    { ?>
    <div class=”moduletable<?php echo $params->get(‘moduleclass_sfx’); ?>” id=”Mod<?php echo $module->id; ?>”>
    <?php if ($module->showtitle != 0) : ?>
    <h3><span><?php echo $module->title; ?></span></h3>
    <?php endif; ?>
    <?php echo $module->content; ?>
    </div>
    <?php
    }
    ?>
    [/PHP]
    So, you can add your class or change all module class/id in :
    [PHP]
    <div class=”moduletable<?php echo $params->get(‘moduleclass_sfx’); ?>” id=”Mod<?php echo $module->id; ?>”>
    [/PHP]
    And then, in index.php, you use


    <jdoc:include type="modules" name="ads-med-rectangle" style="jamodule" />

    </blockquote>

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 3 voices, and was last updated by  cgc0202 15 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum