Geego cms - content mangement system - website management

Template definitions syntax

Each definition file contains a comma sperated list of content data items. These items are hashs with at least one key value pair of :name=>

eg.

{:name=>'tm_Page_title', :formatting=>false},
{:name=>'tl_Text_1'},
{:name=>'swf_Flash'}


Now enter the repeater grids, these are very cool. Repeater grids provide a table like group of data items with the ability to add unlimited rows.

The repeater content data type has an attribute called fields which holds a comma seperated list of content data items representing the fields. Similar to the main list syntax except the content data item can be just a string if it has no attributes other than name.

eg. 1. A simple 1D menu

{:name=>'r_Menu', :fields=>['at_Link']}

eg. 2. A list of photos

{:name=>'r_Photos',
:fields=>['tm_Description',
             {:name=>'img_Photo', :height=>300, :thumb=>{:width=>150}}]
}

Repeater grids can also have recursion giving you nested data with ease. Recursion is done by naming a field with a content data type of rc.

eg. A multi dimensional menu

{:name=>'r_Menu', :fields=>['at_Link', rc_Sub_menu']}


Repeaters can also contain another repeater.

eg. A group of friends with their (unlimited) photos

{:name=>'r_Friends_list',
:fields=>['ts_Name',
                    'tl_Description',
                    {:name=>'r_Photos', :fields=>[{:name=>'img_Photo', :width=>266, :thumb=>{:height=>94}},'tm_Caption']}]
}