Documentation of CMSMS Variables

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Connie

Documentation of CMSMS Variables

Post 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
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Documentation of CMSMS Variables

Post 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
NaN

Re: Documentation of CMSMS Variables

Post by NaN »

There already is a plugin {get_template_vars} wich prints out all available template vars with name and value.
Connie

Re: Documentation of CMSMS Variables

Post 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?
Last edited by Connie on Mon Jun 29, 2009 10:28 am, edited 1 time in total.
NaN

Re: Documentation of CMSMS Variables

Post by NaN »

Well erm... there are thousands of variables.
Just try this code as UDT:

Code: Select all

global $gCms;
print_r($gCms);
Press refresh in frontend and get some coffey...  ;D

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.
Connie

Re: Documentation of CMSMS Variables

Post by Connie »

NaN,

I will study the API documentation, thanks for the hint, I couldn't find that in the docu or somewhere else..
alby

Re: Documentation of CMSMS Variables

Post by alby »

NaN wrote: Well erm... there are thousands of variables.
Just try this code as UDT:

Code: Select all

global $gCms;
print_r($gCms);
There is {dump} plugin also for more control

Alby
Connie

Re: Documentation of CMSMS Variables

Post by Connie »

thanks for all the good hints!
Post Reply

Return to “Developers Discussion”