Hello All,
I am trying to create a new Field Type at my suitecrm instance.
The new Field is a map viewer .
The new field will have custom view for the three actions (“DetailView” , “EditView” and “ListView”)
where both DetailView and EditView will view the map inside the form next to the field label
but at the ListView will show the map right after the table list.
So at Class of the new i created that extended the “SugarFieldBase” ,
i called the getEditViewSmarty and getDetailViewSmarty methods like this
function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) {
$this->setup($parentFieldArray, $vardef, $displayParams, $tabindex, true);
$mapManager->display($this->ss);
//Some Other lines
}
Please notice the last parameter of calling the setup method is set to true. which is the $twopass flag to make sure that the delimiter is set to “{{” and “}}”
The Map Manager Display method fetch some tpls files i created using the smarty template.
Regards the ListView part, i added a logichook “after_ui_frame” to to call the same method after the ListView which calls the same Display method of the map manager.
like this
//Some Other Lines
$ss = new Sugar_Smarty();
$ss->left_delimiter = '{{';
$ss->right_delimiter = '}}';
$mapManager->display($ss);
So the smarty template (when called from ListView) doesn’t parse the assigned vars and it genearte parsing errors because of the delimiters “{{” and “}}” and it seems it expects to accept single braces “{” as its delimiter even if i changed the delimiter to double braces.
the smarty template can’t even recognize the {literal} and {/literal} which i can see them at the dom using google inspect element tool.
-The expected behaviour that they won’t show up if the tpls were parsed correctly -
Can any one please let me know what i am doing wrong ?
Thank You,