Page 1 of 1
Documentation of CMSMS Variables
Posted: Sun Jun 28, 2009 5:23 pm
by Connie
Hi,
is there a list of cmsms variables around?
In example "page name", pagetitle ..?
I couldn't find a overview of these variables in the docu, which might be helpful
Cheers, Connie
Re: Documentation of CMSMS Variables
Posted: Sun Jun 28, 2009 5:42 pm
by Nullig
There is this:
http://www.cmsmadesimple.org/apidoc/ele ... x_CMS.html
And you can find all template variables with a simple UDT:
Code: Select all
// get all assigned template vars
$all_tpl_vars = $smarty->get_template_vars();
// take a look at them
print_r($all_tpl_vars);
Copy that code into a UDT and call it get_vars, then you can use the tag {get_vars} to print the list of variables on one of your pages.
Nullig
Re: Documentation of CMSMS Variables
Posted: Sun Jun 28, 2009 5:59 pm
by NaN
There already is a plugin {get_template_vars} wich prints out all available template vars with name and value.
Re: Documentation of CMSMS Variables
Posted: Sun Jun 28, 2009 7:42 pm
by Connie
Thanks, but I found the above code which shows quite a lot more variables as the recommended tag more helpful
unfortunately this one shows the info in a very ugly way... not each variable by line
that's why I asked fot the documented list of all CSMSN variables, not only template variables..
any idea?
Re: Documentation of CMSMS Variables
Posted: Sun Jun 28, 2009 8:28 pm
by NaN
Well erm... there are thousands of variables.
Just try this code as UDT:
Press refresh in frontend and get some coffey...
You need to specify a context where you want to access CMS variables.
In a template you have this vars that will be shown with {get_template_vars}.
In a UDT you can access vars with the $gCms Object.
And this is... huge.
The only documentation about this i know is the
API Doc of CMSms.
Re: Documentation of CMSMS Variables
Posted: Mon Jun 29, 2009 10:33 am
by Connie
NaN,
I will study the API documentation, thanks for the hint, I couldn't find that in the docu or somewhere else..
Re: Documentation of CMSMS Variables
Posted: Mon Jun 29, 2009 10:43 am
by alby
NaN wrote:
Well erm... there are thousands of variables.
Just try this code as UDT:
There is {dump} plugin also for more control
Alby
Re: Documentation of CMSMS Variables
Posted: Mon Jun 29, 2009 12:53 pm
by Connie
thanks for all the good hints!