[SOLVED] Newsflash without intro text
I found out that ~/modules/mod_articles_news/_item.php has the line
<?php echo $item->introtext; ?>
Because I dont want to change the core, I searched in the template. It seems to be better to change sth. there.
The Blog-template also has the file modules/mod_articles_news/tmpl/_item.php.
But it looks completely different.
I dont know where to edit what, to make the Newsflash-Module show no or limited intro text.
Could you please help me?
Please Log in or Create an account to join the conversation.
- joomlaplates
- Offline
- Moderator
- Posts: 8807
- Thank you received: 1732
docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core
www.joomlaplates.de/dokumentation.html
Please Log in or Create an account to join the conversation.
I copied _item.php from the module into the template directory and tried to change s.th. with my little knowlegde.
$item_heading = $params->get('item_heading', 'h4');
?>
<?php if ($params->get('item_title')) : ?>
<<?php echo $item_heading; ?> class="newsflash-title<?php echo $params->get('moduleclass_sfx'); ?>">
<?php if ($params->get('link_titles') && $item->link != '') : ?>
<a href="<?php echo $item->link; ?>">
<?php echo $item->title; ?>
</a>
<?php else : ?>
<?php echo $item->title; ?>
<?php endif; ?>
</<?php echo $item_heading; ?>>
<?php endif; ?>
<?php if (!$params->get('intro_only')) : ?>
<?php echo $item->afterDisplayTitle; ?>
<?php endif; ?>
<?php echo $item->beforeDisplayContent; ?>
<?php
$limit =152;
if (strlen($item->introtext) > $limit) {
echo (substr($item->introtext, 0, $limit));
}
else {
echo $item->introtext;
}?>
<?php if (isset($item->link) && $item->readmore != 0 && $params->get('readmore')) : ?>
<?php echo '<a class="readmore" href="' . $item->link . '">' . $item->linkText . '</a>'; ?>
<?php endif; ?>
If I change the limit, there is a new problem. If it is too small the pictures disappear or the following sidebar blog is included in the upper one.
If it is too big there is still text under the picture.
Can I make the intro-text disappear somehow, without those problems?
Please Log in or Create an account to join the conversation.
- joomlaplates
- Offline
- Moderator
- Posts: 8807
- Thank you received: 1732
We are committed to help you with any type of support query, however we can't provide extensive help in terms of customizations. In general customizations may look simple but you will require solid knowledge of web technologies and programming skills to do them or hire a professional who can do it for you.
www.joomlaplates.de/dokumentation.html
Please Log in or Create an account to join the conversation.