Hi All,
I’m looking to have a perfect way to customize plugin tpl view file.
I’m using a plugin in which I see reports by going into that module. Now only I need to add a small button on the view of that report detail. I searched the file and I can now add that button.
But if i will add that in the plugin own tpl file then offcourse it will not be upgrade safe.
Please help me to understand can I do this thing upgrade safely.
@mrabd423
If your plugin into custom module you will not have a problems. If your plugin created not as a module you should use custom
directory for it.
Thank you for your reply @p.konetskiy @pgr .
I know the idea behind custom directory. Let me explain you more precisely.
Let’s suppose I’m using a plugin and the plugin is in the directory below by default
/modules/abc_module
/modules/abc_module/tpl/rep.tpl
Now I want to edit that rep.tpl file above.
So I created the directory below
/custom/modules/abc_module/tpl/rep.tpl
So now after this change offcourse system will consider that rep.tpl file which is in custom directory.
But now my question is.
If plugin got an update and that update also have change in rep.tpl file.
So when i pull or upgrade that plugin it will update the file rep.tpl in core modules directory right.
But how do we get that change in the file which is in custom directory ?
Do we have to manually do that ? Because custom directory file is still the old one right ?
Please help me to understand this.
Thanks in advance.
@mrabd423
You wrote about abstract file and I don’t understend that the file is supporting in core of SuiteCRM or it is part of the plugin only. I see two variants:
- If the file is supporting in core of SuiteCRM it will be working without problem. Only several tpl files are supporting. PHP files is used for customization usualy and they is including tpl files alredy.
- You should know how the plugin support custom directory. If the plugin is looking for the files in custom directory your custom file will be working in a future.