Hello,
I was wondering if there is a possibility to let a Plugin only be executed "OnDocFormRender" when a SPECIFIC Template is selected?
Its actually a quiet simple "plugin".
It does only work in manager. So when somebody wants to make a change of a document or creates a new document, a link appears at the bottom which makes it possible to upload pictures into a gallery only for THIS document.
This link shall only appear when lets say the template selected is "TEST".
It has to work like the Template Variables, which do only show up to get fed with inputs, when a specific template is selected.
Hope someone can help me.
Regards,
name
-
☆ A M B ☆
- 24,524 Posts
I would think you could have an "if" condition checking on which template is being used, and only run the plugin code if the desired template is in use.
Hi thanks for the reply, but actually I don’t know in what Variable the name (or ID?) of the Template is stored?
Perhaps someone knows?
By the way, does someone know in what Variable the document ID is stored (in backend/manager!). For now I have just read it from GET.
the ID of the template is stored in the modx_site_content table, the field name is... template
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id