Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Create function to return a preset height

Quote Reply
Create function to return a preset height
Hello,
I created a div tag in templates to setup the height of the contents (or a section of the templates), and I sat it up like this:

Code:

<div id="<%height_of_div>%>">

How do I write a global or a function to return the "height_of_div" value?
Note: The returned value should be height_4, height_5...etc. which are declared in the CSS file (e.g. #height_4 = 400px;)


The function/global should be something like:


Code:

hight_of_div {
<%if home_flag == 1%>
height_4
<%elseif login_flag == 1%>
height_5
<%endif%>
}

the flags sat based on the page type .. (e.g if it is the home page, then I put <%set home_flage =1%> after the <body> tag.

Thanks
Mark
Subject Author Views Date
Thread Create function to return a preset height Mark2 3490 Nov 16, 2010, 11:18 AM
Thread Re: [Mark2] Create function to return a preset height
Andy 3372 Nov 16, 2010, 11:26 AM
Post Re: [Andy] Create function to return a preset height
Mark2 3366 Nov 16, 2010, 12:11 PM