Certain data sources are likely to be repeated across an entire site or among a related group of templates. In these situations it is desirable to create and maintain the data source in one location. Template data files can then reference these shared data sources, where they are in central data libraries or in the data files of other templates. This lesson illustrates a simple example of referencing the data source used to list all users from the sample data table.
Create a file named users2.data in a test directory of your server and enter the following specification:
Note that external data sources are referenced by specifying both src and name attributes. The src attribute must be the URL (relative or absolute) of a data file, not a template. You can thus reference data files associated with templates, as well as standalone data files used as central libraries of common data sources.
Also note that the data source processor makes absolute no distinction between internal and external data sources. External variables may reference
Copy the template in samples/user.adp to users2.adp.
Tutorial Contents