Get page props for CGSimpleSmarty

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
dwave
Forum Members
Forum Members
Posts: 39
Joined: Mon Aug 13, 2007 11:15 am

Get page props for CGSimpleSmarty

Post 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.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: Get page props for CGSimpleSmarty

Post by Jos »

or use {get_template_vars} in your template. It will show all the available variables with their value.
dwave
Forum Members
Forum Members
Posts: 39
Joined: Mon Aug 13, 2007 11:15 am

Re: Get page props for CGSimpleSmarty

Post by dwave »

It's not the same thing.

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

Return to “Tips and Tricks”