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!
- bubiji
-
- Free Templates / Extensions
- Friday, 18 March 2022
- Subscribe via email
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; ?>
- more than a month ago
- Free Templates / Extensions
- # 1
Thank you
I have updated your News module overrides, adding the content.prepare statement to item descriptions.
Ciaran
I have updated your News module overrides, adding the content.prepare statement to item descriptions.
Ciaran
- more than a month ago
- Free Templates / Extensions
- # 2
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!
- more than a month ago
- Free Templates / Extensions
- # 3
Thank you
Could I ask you to allow us access to your template editor so we can create the required override for you.
Ciaran
Could I ask you to allow us access to your template editor so we can create the required override for you.
Ciaran
- more than a month ago
- Free Templates / Extensions
- # 4
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
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
- more than a month ago
- Free Templates / Extensions
- # 6
Hello
Our J51 News module is based on the Joomla core module, Newsflash. Is the issue also present with this core module?
Ciaran
Our J51 News module is based on the Joomla core module, Newsflash. Is the issue also present with this core module?
Ciaran
- more than a month ago
- Free Templates / Extensions
- # 8
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »