-
AuthorPosts
-
leisurepublishing Friend
leisurepublishing
- Join date:
- February 2009
- Posts:
- 49
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 10
- Thanked:
- 5 times in 1 posts
April 20, 2009 at 8:23 pm #140433So 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 FriendCss Magician
- Join date:
- October 2014
- Posts:
- 741
- Downloads:
- 43
- Uploads:
- 53
- Thanks:
- 114
- Thanked:
- 366 times in 263 posts
April 21, 2009 at 1:29 am #302024Hi 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 Friendleisurepublishing
- Join date:
- February 2009
- Posts:
- 49
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 10
- Thanked:
- 5 times in 1 posts
April 21, 2009 at 12:28 pm #302072Okay, 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 FriendCss Magician
- Join date:
- October 2014
- Posts:
- 741
- Downloads:
- 43
- Uploads:
- 53
- Thanks:
- 114
- Thanked:
- 366 times in 263 posts
April 22, 2009 at 1:28 am #302140Hi leisurepublishing,
yes of course, I think you can remove : id=”mod…” or you set the your style
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
April 22, 2009 at 3:08 am #302143Hi 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=125415Kindly 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> -
AuthorPosts
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