Hi,
Do you really need a function?
In include_header.html, do something like:
<%set height_of_div = "1234"%>
<%elsif login_flag == 1%>
<%set height_of_div = "1100"%>
<%elsif search_flag == 1%>
<%set height_of_div = "900"%>
<%else%>
<%-- default height, where no "flags" are set --%>
<%set height_of_div = "1000"%>
<%endif%>
..and just add as many "flags" as you want (obviously you need to "set" these flags in the templates, i.e in search.html / search_results.html, you would do: <%set search_flag = "1"%>)
Then, whereever you wanna use that "height", you would simply call it with:
<%height_of_div%> (be sure to remove the global too, otherwise it will stop that variable working )
Hope that hepls
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Do you really need a function?
In include_header.html, do something like:
Code:
<%if home_flag == 1%> <%set height_of_div = "1234"%>
<%elsif login_flag == 1%>
<%set height_of_div = "1100"%>
<%elsif search_flag == 1%>
<%set height_of_div = "900"%>
<%else%>
<%-- default height, where no "flags" are set --%>
<%set height_of_div = "1000"%>
<%endif%>
..and just add as many "flags" as you want (obviously you need to "set" these flags in the templates, i.e in search.html / search_results.html, you would do: <%set search_flag = "1"%>)
Then, whereever you wanna use that "height", you would simply call it with:
<%height_of_div%> (be sure to remove the global too, otherwise it will stop that variable working )
Hope that hepls
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!