insert footerTPL on SugarCRM views

sugarcrmdevelopers —  March 24, 2011

Editor’s Note: Another blog post from Sugar Community member Milos Miric, showing how to use the footerTPL parameter on editviews and detailviews to add additional custom content to those views.

Hello everyone :) Hope you had a great time for new year and all other holidays. It’s been a while since i wrote last time because i was busy myself working on some projects and having some good times on mountain. I don’t know to ski although i do enjoy snow much. Maybe i learn one day who knows :)

Now, back on topic!

What i would like to talk about today is something that can give you extensive level of customization on editview or detailview. Inside editviewdefs or detailviewdefs there is a tag footerTPL that requires a file to be specified as value and it will try to parse the complete file as smarty template file. If you want to avoid this you can just put {literal} on start and {/literal} on end of it.

Example:

[PHP]<br />
&amp;#8216;footerTpl&amp;#8217;=>&amp;#8217;custom/modules/Accounts/tpls/accounts_footer_view.html&amp;#8217;<br />
[/PHP]

This should be inside form array in def files.

On the picture below you can see where the html will be inserted.

Footer insert point

The yellow color on picture illustrates the point where the included file will be inserted and there is basically no limitation on what you can insert. Any html you could think of can be inserted and supported with php with ajax.

Share