1. bubiji
  2. Free Templates / Extensions
  3. Friday, 18 March 2022
  4.  Subscribe via email
Hi!

We are using J51 Skylar for Joomla 4 template. Our articles are composed from custom fields using their shortcodes. But when we use J51 News module, the intro text is not displayed at all, nor is the shortcode. Is it possible to add an option to pre-prepare the content so the shortcodes are taken into account?

Thank you!
Accepted Answer Pending Moderation
0
Votes
Undo
Hello

Our J51 News module is based on the Joomla core module, Newsflash. Is the issue also present with this core module?

Ciaran
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Yes it is also present on core module Newsflash.
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Hello

May I suggest sending temporary administration access to your Joomla installation to info@joomla51.com and we will look into creating an override for your module with the prepare.content set to your news item caption. For our reference please paste a link to this post in your email.

Please provide a URL to an example of the elements not working without prepare content.

Ciaran
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
We have send you the requested information. Please look into the issue. Thank you!
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Thank you

Could I ask you to allow us access to your template editor so we can create the required override for you.

Ciaran
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 5
Accepted Answer Pending Moderation
0
Votes
Undo
Sorry, did not notice that you do not have that access. It is corrected now. You should be able to access template editor. Thank you!
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 6
Accepted Answer Pending Moderation
0
Votes
Undo
Thank you

I have updated your News module overrides, adding the content.prepare statement to item descriptions.

Ciaran
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 7
Accepted Answer Pending Moderation
0
Votes
Undo
Thank you for your help. But the content.prepare statement did not work. After a bit of searching the web I found out there is no other way but to create a SQL statement and filter the values of the right custom field. It is not ideal but here is the code that worked for me:

<?php if ($show_text) : ?>
<<?php echo $text_tag; ?> class="newstext j51news-caption"><?php
$introb = strip_tags($item->introtext);
$intro = JHtml::_('string.truncate', $introb, $length_text);

$id=$item->id;
$db = JFactory::getDbo();
$query = 'select * from #__fields_values where item_id = "'.$id.'"';
$db->setQuery($query);
$fields = $db->loadObjectList();

foreach ($fields as $field) {
if ($field->field_id == 3) { // 3 - id of our custom field for intotext
$intro = $field->value;
}
}

echo $intro;
?></<?php echo $text_tag; ?>>
<?php endif; ?>
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 8
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!

Join Our Newsletter

* indicates required
We respect your privacy and do not tolerate spam and will never sell, rent, lease or give away your information (name, email, number, etc.) to any third party. Nor will we send you unsolicited email.
Joomla51 - Mullaghmore, Co. Sligo, Ireland
Joomla51.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by
Open Source Matters
the trademark holder in the United States and other countries.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok