Where to find variables used in themes

Hi.

I am watching the themes code and see some varibles from Suite CRM like:

head.tpl uses:

{$APP.LBL_BROWSER_TITLE} {$SUGAR_JS} {literal}

In other case i noted this:

{sugar_translate module=“Users” label=“LBL_LANGUAGE”}

So, my question is, is there any referencia manual about that variables? or how know what variables can i invoke?

Thanks.

SuiteCRM uses Smarty for the template rendering .

What you could do is var_dump the values if you need to know what they contain.

For example:

{$var_name|@var_dump}

This will show a var_dump of the Smarty variable $var_name.

Smarty also allow you to set your own variables, but you will need to find the particular class that activates it and possible create a custom class extending it so you can include your own template. Have a look at a similar topic where to adjust the template we needed to create a custom one.

https://suitecrm.com/forum/suitecrm-7-0-discussion/7061-how-to-hide-checkbox-for-contracts-listview-in-sugarcrm-for-the-records-having-status-signed

Hope this helps.

Hi, Thanks for answer.

What i’m looking is any documentation of that variables or something similar?

Thanks.

Hi there,

Unfortunately there is no documentation of all the variables as this can be different per template.

It really depends on the template itself - some templates for example the ListView will show the rowData, and the Search Form and this is dealt with differently when its the DetailView of Emails module.

Is there a particular template you wish to investigate?

Usually look at the DetailView.tpl within include/DetailView (EditView and ListView in their corresponding folders)