Geego cms - content mangement system - website management

Templates display pages reference

Small text Medium text Large Text Select options Image Text link Image link Flash file File Repeater or recursive repeater

Small text

        top of page

Template definition

{:name=>'ts_First_name'}

Display template

<p>
Hi <%= @g[:first_name] %>
</p>

Medium text

        top of page

Template definition

{:name=>'tm_Short_description']

Display template

Description:
<br />
<p><%= @g[:short_description] %></p>

Large Text

        top of page

Template definition

{:name=>'tl_Story']

Display template

<h2>Our story: </h2>
<br />
<p><%= @g[:
story] %></p>

Select options

        top of page

Template definition

{:name=>'sel_Favourite_color', :options=>['red', 'blue', 'green']}

Display template

<p>
And the favourite colour today is <%= @g[:favourite_color] %>
</p>

Image

        top of page

Output attributes of image
[:show] Image address, this is set to /gee_assets/white_space.gif if no image is present (1px by 1px transparent gif)
[:width] Width
[:height] Height
[:border] Set to 1 if image is uploaded or 0 if no image
[:thumb] Thumb with same attribute options as image ([:thumb][:width] etc)

Template definition


{:name=>'img_Photo', :width=>300, :thumb=>{:height=>80}}

Display template

<div>
 
<%= image_tag @g[:photo][:thumb][:show], :alt=>"thumb nail photo" %>
</div>


<div>
  
<%= image_tag  @g[:photo][:show], :width=>@g[:photo][:width] , :height=>@g[:photo][:height], :alt=>"main photo" %>
</div>

Text link

        top of page

Output attributes of text link
[:show] Text that is displayed
[:address] Link address

Template definition


{:name=>'at_Partner_link'}

Display template

<div>
  
<a href="<%= @g[:partner_link][:address] %>"><%= @g[:partner_links][:show] %></a>
</div>

Image link

        top of page

Output attributes of image link
[:show] Image address, this is set to /gee_assets/white_space.gif if no image is present (1px by 1px transparent gif)
[:width] Image width
[:height] Image height
[:border] Set to 1 if image is uploaded or 0 if no image
[:address] Link address

Template definition


{:name=>'ai_Partner_link'}

Display template

<div>

  <a href="<%= @g[:partner_link][:address] %>">
    <img src="<%= @g[:partner_link][:show] %>" alt="link photo" />
  </a>

</div>

Flash file

        top of page

Output attributes of flash file
[:show] Flash file address
[:width] Width
[:height] Height

Template definition


{:name=>'swf_Teaser'}

Display template

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="<%= @g[:teaser][:width] %>"
height="<%= @g[:teaser][:height] %>">

<
param name="movie" value="<%= @g[:teaser][:show] %>" />
<
param name="quality" value="high" />
<
param name="loop" value="false" />

<embed
src="<%= @g[:teaser][:show] %>"
loop="false"
quality="high"
width="<%= @g[:teaser][:width] %>"
height="<%= @g[:teaser][:height] %>"
type="application/x-shockwave-flash"
pluginspace="http://www.macromedia.com/go/getflashplayer">

<
/embed>

<
/object>

File

        top of page

Output attributes of file
[:show] Flash file address
[:width] Width
[:height] Height

Template definition


{:name=>'file_Pricing_pdf'},
{:name=>'file_The_movie' :type=>'mov'}

Display template

<a href="<%= @g[:pricing_pdf][:show] %>"> View the pricing schedule </a>

<object classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b"
codebase="http://www.apple.com/qtactivex/qtplugin.cab"
width="<%= @g[:the_movie][:width] %>"
height="<%= @g[:the_movie][:height] %>">
<param name="src" value="<%= ADMIN_ASSETS_URL %>/<%= @g[:the_movie][:show] %>" />
<param name="loop" value="true" />
<param name="autoplay" value="false" />
<embed src="<%= @g[:the_movie][:show] %>"
autoplay="false"
loop="false "
width="<%= @g[:the_movie][:width] %>"
height="<%= @g[:the_movie][:height] %>"
type="video/quicktime"
pluginspage="http://www.apple.com/quicktime/download/" />
</object>


Repeater or recursive repeater

        top of page

Output attributes
The repeater is an array of hash values that contain the field data.

Template definition

{:name=>'r_Friends_list',
:fields=>['ts_Name',
'tl_Description',
{:name=>'r_Photos', :fields=>[{:name=>'img_Fun_photo', :width=>266}]}]
}


Display template

<%
for friend in @g[:friends_list]
    %>
    <p>
        Name: <%=
friend[:name] %>
        <br />
        Description: <%=
friend[:description] %>
        <br />
        Photos:
        <br />
    <%
    for photo in
friend[:photos]
        %>
        <%= image_tag photo[:fun_photo][:show], :alt=>friend[:name] + "photos" %>
        <%
    end
    %>
    </p>
    <%
end
%>