Can i use php class static properties in smarty template?
For example:
class UserData
{
const INDEX = 1;
const STREET = 2;
static public $_address_fields = array(
self::INDEX,
self::STREET
);
}
{UserData::$_address_fields}
You should be able to pass this in from your controller?
For example:
$smarty->assign('AddressFields, UserData::$_address_fields);
This should then be avilable for use in your template like so:
{$AddressFields}
Smarty Docs: https://www.smarty.net/docsv2/en/api.assign.tpl