Using Snippets and Configuration Settings

Often, you'll have chunks of code or text that you want to use in more than one place. It's always better to avoid having the same information in more than one place, so when you update it you don't need to find all the places you need to make the same change.

Webvanta provides two ways to store such information: snippets and configuration settings. Configuration settings are typically used for single strings, such as color values or copyright strings, whereas snippets are used for longer chunks of information. Here's how the two tags are used:

<w:snippet name='snippet name' /> Returns the contents of the named snippet.
<w:data name='config setting name' /> Returns the contents of the named configuration setting.

Add Your Comments

(not published)

Join our Free Learning Webvanta Course

We'll send you a series of brief lessons and tips on making the most of Webvanta. In less than a month you'll be an expert at building powerful, database-driven sites.

Name:
Email:

We hate spam as much as you do. We'll use your address only for sending you this course and Webvanta updates.

Related Articles