Answer the question
In order to leave comments, you need to log in
Joomla - how to style the latest news?
Joomla 2.5
It is planned to display 5 latest news in the sidebar. I did the following: I created a category for materials, then added 5 news to this category, went to the module manager and added a module of the type Materials - News (displays a given number of news from the selected category) in the template I registered the output of the module through for the STYLE
tag created a new style under called NEWS
Also in the style folder I created the html folder and in it I already created the modules.php file
<?php
defined('_JEXEC') or die('Restricted access');
function modChrome_news($module, $params, $attribs){
echo "<pre>";
print_r($module);
echo "</pre>";exit;
if (!empty ($module->content)) : ?>
<div>
<?php echo $module->content; ?>
</div>
<?php endif;
}
?>
stdClass Object
(
[id] => 100
[title] => Новости
[module] => mod_articles_news
[position] => potolki-sidebar-news
[content] =>
Описание новой новости Описание новой новости Описание новой новости <b>(1 материал)</b>
Описание новой новости Описание новой новости Описание новой новости <b>( 2 материал)</b>
[showtitle] => 1
[params] => {"catid":["78"],"image":"0","item_title":"0","link_titles":"","item_heading":"h4","showLastSeparator":"1","readmore":"0","count":"5","ordering":"a.publish_up","layout":"_:default","moduleclass_sfx":"","cache":"1","cache_time":"900","cachemode":"itemid"}
[menuid] => 0
[user] => 0
[name] => articles_news
[style] => news
)
Answer the question
In order to leave comments, you need to log in
modules\mod_articles_news\tmpl
if your module is "mod_articles_news", then there will be php files of the module template. in the same place, in my opinion, you can create your own templates ... I'm not sure exactly
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question