Dynamic Content
This sample demostrates how to render different sections based on different values. During the rendering stage, the Render If script will run.
The following is an example:
1) Add in the following script in the Section Wizard/Scripts under Render If for Section 1 -
var ds = DataCacheManager.getCache("DataSource 1");
ds.getString("Fruit") == "Apple";
2) Add in the following script in the Section Wizard/Scripts under Render If for Section 2 -
var ds = DataCacheManager.getCache("DataSource 1");
ds.getString("Fruit") == "Orange";
An explanation for the above is -
Section 1 will execute if the value from the datasource is "Apple" and execute Section 2 if the datasource is "Orange".
Sample
--
ZacSim? - 23 Jul 2007