mod_include 0.01

mod_include is a post processing of SSI variables, Apache module.
mod_include is a post processing of SSI variables, Apache module.

Doesn't sound too helpful ? Well, maybe not, but I found that during construction of this site that I was frequently replicating 5 lines of text with only a single word altered (the left menu). This was both inefficient and awkward to debug, and didn't lend itself to keeping a common look and feel for the site as a whole. This extension allows large blocks of text to be stored as a variable, and for the small changable part to be altered just before the result is displayed.

What's wrong with set anyway ?

When a variable is used in the value entry of a set command the system searches for the current value of the variable and substitutes it immediately. This fixes the value of the variable created so that it never changes, which is good for some applications, but lousy for dynamic content.

Usage

This module is an extension of the normal Apache behaviour, and should be read as an addendum to the basic mod_include commands.

define

This command sets up a variable in the same way as the set directive, except that any variable names used are not parsed at this time, but stored as names until displayed with the macro directive.

var

The name of the variable (macro) to define.

value

The value of the variable (macro).

macro

This command will expand a previously defined variable and replace any instances of the variable named in var in the variable def with the value given in value. Note that like other mod_include commands, the order of the variables is important, and should be declared in the sequence shown below:

var

The name of the variable to replace inside the macro.

value

The value to replace the variable with.

def

The previously defined macro to seach through.

last updated on:
May 12th, 2006, 16:40 GMT
price:
FREE!
homepage:
minimal.cx
license type:
The Apache License 
developed by:
Ian Spray
category:
ROOT \ Internet \ HTTP (WWW)
mod_include
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT