I note that many of the backend templates contain Smarty tags like {btn} and {dropdown}
eg
{btn type="list" text=__("clone_selected") dispatch="dispatch[pages.m_clone]" form="pages_tree_form"}
or
{dropdown content=$smarty.capture.tools_list}
Where are these tags defined? They don't seem to be standard Smarty tags but I can't find any definition in the CSCart code.
And why can't I use them in frontend templates? When I try using them in a design/themes template, I get an error like:
Uncaught --> Smarty Compiler: Syntax error in template ... unknown tag "dropdown" <-- thrown
Hello!
Take a look at "design/backend/templates/buttons/helpers.tpl" file, the "btn" and "dropdown" Smarty functions are defined there.
This file is only being included at the backend main template "design/backend/templates/index.tpl", that's why you cannot use them in frontend templates.
Many thanks! Don't know how I missed finding that for myself. Is there any reason why they are not made available to front end templates? I could hook into index:head_scripts and include similar helpers.tpl into the frontend index.tpl.
Many thanks! Don't know how I missed finding that for myself. Is there any reason why they are not made available to front end templates? I could hook into index:head_scripts and include similar helpers.tpl into the frontend index.tpl.
That's because the HTML markup generated by those functions is designed for Twitter Bootstrap classes. Responsive theme doesn't uses Bootstrap, only backend does.
I think you can freely create clone of "helpers.tpl" file and hook it into your theme.