Top Left Text cha

Web & App Development

This is basically the equivalent of WordPress's 'do_shortcode' for Joomla.

If your shortcode is, for example, {component shortcode}, the following line will work...

echo JHtml::_('content.prepare', '{component shortcode}');

$output =JHTML::_('content.prepare', $output); return $output; 

In my most recent case, I needed to grab the user id of the person that authored a resume to use in the shortcode...

$resUid = $this->resume->uid;
$notify = JHtml::_('content.prepare', '{pmslink:id='.$resUid.'}');
return $notify;

Add comment

Security code

  • No comments found

Leave your comments

Post comment as a guest

Your comments are subjected to administrator's moderation.