Page 1 of 1

Get page props for CGSimpleSmarty

Posted: Fri Jul 29, 2011 8:55 am
by dwave
Sometimes it is not obvious what the internal name of a page property is that you defined with a content block. Special characters and umlauts for example are translated to ASCII and you need this name in order to access a certain property with CGSimpleSmarty or your own Modules and PHP Tags.

To get all internal property names of a page, open the table `cms_content` in your database. The column `prop_names` contains all available page properties and their internal name.

Re: Get page props for CGSimpleSmarty

Posted: Fri Jul 29, 2011 9:52 am
by Jos
or use {get_template_vars} in your template. It will show all the available variables with their value.

Re: Get page props for CGSimpleSmarty

Posted: Fri Jul 29, 2011 10:00 am
by dwave
It's not the same thing.

{get_template_vars} shows defined vars but the database reveals the name of defined content blocks.