Alan
|
| Posted: 03/14/2002, 10:03 AM |
|
How would you dynamically change a field caption based on some value? For example, in the Book Store example, I would like to show the "Checkout" link only if there is a shopping cart total > 0.
|
|
|
 |
Nicole
|
| Posted: 03/15/2002, 2:21 AM |
|
Alan,
- in template version define field caption like {link}
in BeforeShow event depending on the condition assign real value to it, e.g.:
PHP
if (condition)
$tpl->set_var("link", "Checkout");
else
$tpl->set_var("link", "");
- in templateless version define field caption as <?=$link?> and again in BeforeShow event assign it a value. E.g.:
if (condition)
$link = "Checkout";
else
$link = "";
|
|
|
 |
|