I am trying to change the layout of the detailview for the accounts module. As of now, I think the best way to do this would be to create a custom detailview.tpl only for the accounts module⦠Anyone have any idea how to do this?
Thanks
I am trying to change the layout of the detailview for the accounts module. As of now, I think the best way to do this would be to create a custom detailview.tpl only for the accounts module⦠Anyone have any idea how to do this?
Thanks
From what your describing, the internal Studio should be just fine. Add any new fields that you need, then add them to the detailview for accounts. It is very intuitive. No need to change any code, the studio allows a gui interface to do what you need.
Try it in a development environment and let us know of any problems.
What Iām trying to accomplish is to have the panels in the detailview tiled, side by side, rather than stacked. I havenāt found a way to do this in studio so I started to ānosediveā into the code and see where to start
Sorry to resurrect this topic, but I am looking for answer to this same question.
I echoād out $this->dv and saw there is an array value called ā[tpl]ā, that references include/DetailView/DetailView.tpl.
I tried to add this line into my moduleās detailviewdefs.php file but got no luck redirecting it to a custom directory. I see guides for how to do this with the header.tpl and footer.tpl files but not the DetailView.tpl file.
SOLVED (mostly):
There is a way to override the DetailView.tpl file for only a specific module, but be aware that the styling of the panels and actions menu do not appear if you do this and need to be added back in.
If you create yourself a file in custom/module/YOUR_MODULE/views/view.detail.php,
Then you need to basically copy the preDisplay() function from include/MVC/View/views/view.detail.php into your file.
Youāll notice on that last line:
$this->dv = new DetailView2();
$this->dv->ss =& $this->ss;
$this->dv->setup($this->module, $this->bean, $metadataFile, get_custom_file_if_exists('include/DetailView/DetailView.tpl'));
That it is passing the location of the main tpl file for the DetailView to the setup function.
I changed the file location to say:
$this->dv->setup($this->module, $this->bean, $metadataFile, get_custom_file_if_exists('modules/Opportunities/tpls/DetailView.tpl'));
And since thats wrapped with the get_custom_file_if_exists() function, it will go out and the file in the custom directory.
Sorry for replying to this old topic. But iām looking for possible solution to this.
be aware that the styling of the panels and actions menu do not appear if you do this and need to be added back in
I have tried out the code and as you said the styling of the panel does not appear for your custom tpl file. Seems like whichever css files that was suppose to be added is not added.
Iām not familiar with how suitecrm applies its styling to a file. So anyone can help with this?
Hi, I know itās a late post, but Iām facing the same problem. Iāve tried multiple options, but I canāt find a way to restore the styling of my panels in my custom file. Is there a solution or another approach I could try?
Thanks.