I’m working on Suitecrm 7. And I want to custom-create a column filter the same as the default.
I have created one entry point ‘customdetails.php’. And I have created an Admin section to open these entry points. Now, I need to create a custom column filter in my entry point file same as the default column filter in Listview.
I have seen these files for reference: include/ListView/ListViewColumnsFilterDialog.tpl include/ListView/ListViewColumnsFilterLink.tpl include/ListView/ListViewPagination.tpl
But in this file, the code of the .tpl file is written, so can I use this code in the entrypoint file? And if I can, how can I do it?
You can try studying Smarty templates to learn how they are used.
I would advise to look at a simpler example first, not list views, because those are quite complex.
The general idea is like this:
$ss = new Sugar_Smarty();
// pass some values into the template to replace the placeholders there:
$ss->assign("SomeValue", $x);
$ss->assign("AnotherValue", $y);
// get Smarty to render the substituted and processed template:
$rendered = $ss->fetch($templateTplFile);
I’m familiar with Smarty templates, but I’m scratching my head on how to effectively call or use them in my entrypoint file, residing in ‘custom/customentrypoint.php’.
Your guidance on this would be appreciated. Thanks a bunch!