JackGoa
Member
Yes, we have a helper for that, FabrikHelperHTML::getContentTemplate() ...
Code:/** * Get content item template * * @param int $contentTemplate Joomla article id * @param string $part which part, intro, full, or both * @param bool $runPlugins run content plugins on the text * * @since 3.0.7 * * @return string content item html */ public static function getContentTemplate($contentTemplate, $part = 'both', $runPlugins = false)
So yes, you could use an eval'ed msg, and include your own template. You'd have to do your own placeholder replacement though, as we do that before we do any eval'ing of the msg.
So something like ...
Code:$myTmpl = FabrikHelperHTML::getContentTemplate(123, 'both', true); return $w->parseMessageForPlaceHolder($myTmpl, $row);
... would get article 123, concatenating the intro and body of the article, run any content plugins, then do placeholder replacement. $w and $row are already defined in the plugin code that calls your code.
-- hugh
Hugh, could I use your code above, like this:
PHP:
/**
* Get content item template
*
* @param int $contentTemplate Joomla article id
* @param string $part which part, intro, full, or both
* @param bool $runPlugins run content plugins on the text
*
* @since 3.0.7
*
* @return string content item html
*/
public static function getContentTemplate($contentTemplate, $part = 'both', $runPlugins = false)
$myTmpl = FabrikHelperHTML::getContentTemplate(123, 'both', true);
return $w->parseMessageForPlaceHolder($myTmpl, $row);
In the "Message" section of the cron email plugin and it will work? Or does it need something more?
If I wanted to use it in the PHP cron plugin, I would also need to find some code somewhere to actually send an email?