Hello, I've come to a situation when I need to display additional content in header of site. I would like to add a placeholder like and replace it with some content when template is rendered. However, the only place for rendering such placeholders I found is BxDolTemplate->parseSystemKey(), which is a core class. So, my question is how do I add processing of custom placeholders without modifying core classes? Is this possible?
Secondly, I am slightly confused with injections. I was able to add an injection in database (by copying and modifying head injection) and display it on the site, but had no success in displaying it in Studio->Designer->Injections. How do I add my custom injections there?
If you write your own application then custom keys can be added via redeclaration of this method in the child of Template class. For example, for Persons app, it would be written in BxPersonsTemplate.php file.
About your second question - this isn't clear why you added your own injections via database but not via Studio. It's correct to do it only there.
Thank you for the response, LeonidS ! As far as I understand, I can add custom placeholders for app related views when writing an app. But how do I change _sub_header.html processing, if it is processed by core class? I tried experimenting with child theme, but had no success yet.
Regarding injections, could you please describe where can I add them in Studio? Thank you
I cannot find anything like BxTemplFunction.php in the sample template module. Where can I get an example of this class?
Also, I would like to clarify the use of injections: say, we have before_main_logo injection (if I'm not mistaken - this is default for UNA templates), which doesn't exist. If I create an injection with such a name in the database, it will be shown on the website. However, I don't see it under Designer->Injections, meaning that user cannot modify an injection. How can I display injections under Designer->Injections?