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; ?>