V
V
Victor Golovko2018-09-18 17:40:07
Joomla
Victor Golovko, 2018-09-18 17:40:07

Joomla. How to get and change content before output?

Friends, tell me about the issue.
Is it possible to get content in joomla before it is given to the browser.
The task is this: you need to replace the pseudo-variables in the content with their corresponding values.
In the article, I want to make a shortcode like .
While rendering the page, I want to fetch the article, find the shortcode, parse it, and replace that shortcode with the content that my function will return.
And only then return the content to the browser.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2018-09-27
@siptik

If the shortcode needs to be parsed in an article, then this is done by creating a plugin of the content type and catching the onContentBeforeDisplay event.
Documentation for creating a content plugin. https://docs.joomla.org/J3.x:Creating_a_content_plugin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question