Write Once Use Many

Reuse the same code over and over again on your site with the [include] context.

Reusing your same code over and over again on many pages within your website is a snap. The best examples would be to have an include file with your page header, navigation and page footer. Then from every page of your website you can insert the same files. This especially makes management of navigation links a snap because you only need to keep one text file up to date.
[include file=/header_file.inc]
[include file=/navigation_links_file.inc]
{the body of content would go here}
[include file=/footer_file.inc]

The example above shows the include files saved to the root directory of your website. You could organize a bit easier by saving them in an /includes/ directory. Doing so would change the code to look like this:
[include file=/includes/navigation_links_file.inc]

Matthew Perosi - Psi Prime


Top Articles:

WebDNA Libraries

A list of available libraries for WebDNA...


A compilation of some user's questions...

Download WebDNA Applications

WebDNA applications...

AWS Raw WebDNA LAMP-Plus WebServer

Amazon Web Services (AWS) README for Machine Image ID...

Tips and Tricks

A list of user-submitted tips ...

Technical Change History

This Technical Change History provides a reverse chronological list of WebDNA changes...

Related Readings:

random password-generator code

Generate a random alpha-numeric string...

Removing whitespace

How can I remove all whitespace entered by a user from an input box (ie card number)...

WebDNA interaction with zip

I have a project where I'm allowing several people to upload images...

Export data to Excel

Here's a handy way to export your data to a text or Excel file...

Using a simple Array of Variables with [interpret]

The [interpret] context is very powerful command in the hands of a skilled WebDNA programmer...

How to create a RSS feed

How to create a RSS feed from yourdatabase on formation...