I've created a template override for the article view where the intro and the full text are invoked separately.

So, instead of

<div itemprop="articleBody">
        <?php echo $this->item->text; ?>

I'm using

<div class="intro_text"><?php echo $this->item->introtext;?></div>
        <div class="full_text"><?php echo $this->item->fulltext . JHTML::_('content.prepare'); ?></div>

The inclusion of JHTML::_('content.prepare') doesn't change anything.

Interestingly, content plugins load normally if explicit commands in curly brackets are not required. However, when {command} is required to load a plugin, said {command} is displayed as-is (raw and unprocessed).


You are invoking content.prepare without parameters. One of those parameters is the text you want the plug-ins to process. So your code runs the content plug-ins and then appends an empty string to the output.

I think this is the refence you want https://docs.joomla.org/Triggering_content_plugins_in_your_extension.

  • Actually, the plugin is not triggered at all. That is to say, the command is displayed raw, as if it were plain text. On the other hand, something like <?php echo $this->item->introtext . '{loadposition Position-1}' . $this->item->fulltext; ?> wouldn't do it ether because the command must be manually added by the users to certain individual articles. Thanks for helping! – manchine Oct 19 '17 at 19:46
  • Following code did the trick: <?php $fulltext = $this->item->fulltext; $fulltext_prepped = JHtml::_('content.prepare', $fulltext); ?> <div class="intro_text"><?php echo $this->item->introtext;?></div> <div class="full_text"><?php echo $fulltext_prepped; ?></div>. – manchine Oct 19 '17 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.