I have to develop a simple plugin that add simple a text directly in body and on every page, the problem is i see this content only on content pages, but don't on pages like: flexicontent & virtuemart For it i use event:

onContentPrepare ($context, &$article, &$params, $page) {}

Type is "system", what i have to do to enable it on all pages?

2 Answers 2


Most likely, flexicontent and Virtuemart don't trigger the onContentPrepare event. That event is something extension need to include themself. It's not automatically done by Joomla.

If you need to have it on each page, then your better using a system event which is executed by Joomla itself.

  • You mean my plugin type should stay "system" and i can use simple: onBeforeRender() ?
    – jExchange
    May 29, 2015 at 10:37
  • For example, yes. Depending what exactly you do :)
    – Bakual
    May 29, 2015 at 11:56
  • now is only on hikashop product listing missing, is there any "hack" or something like this to add it also on category list?
    – jExchange
    May 29, 2015 at 13:03
  • onBeforeRender should work on all pages. It's called by the application rendering method itself. Now I don't know how hikashop works internally, maybe it uses AJAX or has some funny code otherwise?
    – Bakual
    May 29, 2015 at 13:17
  • No, not ajax, the homepage on the web has k2 item type, and there is also missing.
    – jExchange
    May 29, 2015 at 13:38

Just a long shot, but can you try replacing:



$page = 0

So it will look like this:

onContentPrepare ($context, &$article, &$params, $page = 0) 


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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