kburnett
|
| Posted: 10/24/2002, 10:02 PM |
|
works....
<%
Function site_footer_BeforeShow()
if TemplateFileName = "index.html" then
site_footer.index_footer.Value = "some html stuff"
else
site_footer.index_footer.Value = ""
end if
End Function
%>
does not....
function site_header_BeforeShow() {
global $Tpl;
global $FileName;
if($FileName == 'index.php')
{
$Tpl->non_index_html->SetValue("yehaw");
}else{
$Tpl->non_index_html->SetValue("yehaw?");
}
}
hell, even this does not work....
function site_header_BeforeShow() {
global $Tpl;
global $FileName;
$Tpl->non_index_html->SetValue("yehaw??");
}
what in the world am i missing?
|
|
|
 |
Nicole
|
| Posted: 10/28/2002, 5:41 AM |
|
Hello,
What is "non_index_html"? If it is the field on the form use the following code to assign it a value:
global $form_name;
$form_name->field_name->SetValue("new value");
If it is control (e.g. Label) outside any form use code:
global $control_name;
$control_name->SetValue(123);
If it is custom template variable like {hello}, then use template function to set its value:
global $Tpl;
$Tpl->SetVar("hello", "Hello World!");
|
|
|
 |
kburnett
|
| Posted: 10/28/2002, 7:52 AM |
|
nicole,
once again, you have saved me.
i have been so twisted around with field, label and custom template variable manipulation.
alas, it makes sense.
thanks a million.
kyle
|
|
|
 |
|