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}');
...or...

$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
Refresh

  • No comments found

Leave your comments

Post comment as a guest

0
Your comments are subjected to administrator's moderation.
X