开发者

Joomla: Styling Modules in Articles or News Feeds?

开发者 https://www.devze.com 2023-02-10 04:27 出处:网络
I\'ve got a few news feeds on my Joomla site http://www.myramis.com/index.php?option=com_content&view=article&id=122&Itemid=76

I've got a few news feeds on my Joomla site http://www.myramis.com/index.php?option=com_content&view=article&id=122&Itemid=76

and I was wondering if there is any way to style them? I want to make the title's bigger, and also I wanted to float an image to the right of the news feed itself but at the moment I'm having problems doing this as the news feeds take the information from a module (News Feed module) which makes styling the page very difficult.

Here's my code for the article itself, which includes 2 News Feeds:

<p>{module Latest News}</p>

<p>{module HSE News Feed}</p>

<img src = "images/stories/ist2_10853035-extinguisher.jpg" />
<p>开发者_JAVA技巧{module Info4Fire News}</p>

I have the 'modules anywhere' plugin installed which allows me to use the {module thismodule} syntax by the way.

Hope you can help,

Kind Regards,

Jack Hanly


You can add CSS suffixes to your menu items (open the menu item and use the 3rd set of options in the right hand panel)

You can then put them in your template/index.php as follows:

<?php
// Get additional page class if set by menu
$menus      = &JSite::getMenu();
$active     = $menus->getActive();
$params = new JParameter( $active->params );
$bodyclass = " class='". $params->get( 'pageclass_sfx' ) . "'"
?>


YOUR HTML <HEAD> IN HERE

<body <?php echo $bodyclass; ?>>

YOUR PAGE IN HERE

This way, each menu item can be styled individually by doing

.mymenuitem h1 {color:#FF0000;}

If you want to amend a single image to float in the article/module use:

.mymenuitem img {float:right;}

It would be better to do the following on a global basis

.floatright {float:right;}

You can then just add a class of floatright to any item you want to float.

You might also need to add some margins around the to stop the text crashing into it.

0

精彩评论

暂无评论...
验证码 换一张
取 消