End of Support for Joomla 3 - Forum closed

[SOLVED] Newsflash without intro text

  • Robbe
  • Robbe's Avatar Offline Topic Author
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0

Newsflash without intro text was created by Robbe

Posted 8 years 9 months ago #12144
I want the Newsflash module to limit the intro text or to show no 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?
by Robbe

Please Log in or Create an account to join the conversation.

Replied by joomlaplates on topic Newsflash without intro text

Posted 8 years 9 months ago #12147
You can do this with the Joomla override function
docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core

Please Log in or Create an account to join the conversation.

  • Robbe
  • Robbe's Avatar Offline Topic Author
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0

Replied by Robbe on topic Newsflash without intro text

Posted 8 years 9 months ago #12151
OK.
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?
by Robbe

Please Log in or Create an account to join the conversation.

Replied by joomlaplates on topic Newsflash without intro text

Posted 8 years 9 months ago #12170
Hi again, it seems its not a template related problem.

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.

Please Log in or Create an account to join the conversation.

  • Robbe
  • Robbe's Avatar Offline Topic Author
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0

Replied by Robbe on topic Newsflash without intro text

Posted 8 years 9 months ago #12174
Ok. Thx.
by Robbe

Please Log in or Create an account to join the conversation.

  • Robbe
  • Robbe's Avatar Offline Topic Author
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0

Replied by Robbe on topic [SOLVED] Newsflash without intro text

Posted 8 years 9 months ago #12175
Problem solved.
by Robbe

Please Log in or Create an account to join the conversation.

Moderators: joomlaplates

Installations-Service

Don´t waste your time, we install your purchased Template
with the "Demo Content" within the next 24 hours.

Buy Now - 59€

Joomlaplates/Theme-Point is not affiliated with or endorsed by Open Source Matters or the Joomla! Project

Copyright © 2024 JoomlaPlates | Professional Joomla Templates with Uikit 3

Disclaimer & Privacy | License