Answer the question
In order to leave comments, you need to log in
How to implement the "client hook system" in yii2 in the least cycling way?
Don't be alarmed, I just came up with the term myself, but here's what you need:
A user from the admin panel writes a certain shortcode in the page text - and on the site on this page, a certain widget or view is rendered in place of this shortcode.
In my opinion, the task is the most trivial, but I fell into a stupor on how to do it correctly. Isn't it possible to skip the text of pages through str_replace and replace shortcodes with the result of rendering the desired view? Well, if not out of the box, then what kind of extensions for the convenient implementation of such functionality should definitely be?
I would be grateful not even for a complete answer, but for a kick in the right direction.
Answer the question
In order to leave comments, you need to log in
implement an interpreter on the back to determine shortcodes and replace them with the data you need
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question