This module includes macros to include files
in the source files, so you don't need to copy the
information in the wbb source.
The macros included in this release are:
if using the Macros::macro processor.
* #dir( ), This is an automatic directory include
macro "#dir(realpath,webserverpath,regex)" would be
expanded with a list of files that matched the regex
(regex in perl code)
It will use the use "fileindex.txt" in the realpath directory
to obtain a description of each file, the format of this file
is filename: description.
This processor modifies by defaults wbbin, but this can be
change using the variable "dir.place and setting this to wbbout
* #includefile ( ) include a txt file in the , three arguments,
#includefile(file,search,replace), file is the file to include,
search and replace are regex to be used, to replace text in
the file. file is HTMLEncoded. (by default) to avoid problems
with HTML TAGS.
* #includecode() , like includefile, but the file is included without
any chnage (usuful for including HTML or other language code.
* #listfrom file() , include a txt file, similar to #includefile,
but include the information in a file.
* #tablefromcsv(), create a table (type 2,http://www.rediris.es/app/webber/guia/),
receive up to four arguments, CSV file, fields to print (numeric,
separated by ":" , and a search / replace expression
* #printindex(indexfile), print an index based on the information
* #servar (Var, value), set the value of var variable to a new value
* #var(var) ,put in the putput the value of var.
* #indexdir(type,webber_vars) produces an HTML listing (directory, based
in subdirectories and the contents of some webber vars, it requires two arguments
type: can be ul, ol, dt, (the three type of HTML lists.
webber_var is a list of webber vars to put.
This processors parses the wbbdir.cfg files in a group of subdirectories and produces
the HTML listing , see the documentation
* #execute: Execute a list webber modules,
---
Using the Macros::AddIndex
AddIdex: Add an entry to an index files, this is executed on
each page that we want to be part of the index.
- Makeindex: Read the index file and generate the HTML output.
What's an index ?
An index is a filename that contains information about
the webbered pages, it's deffined as follow:
#index.name= indexname
#index.name.type= [simple, duplicates]
#index.name.file = file
#index.name.key = Key to add to the index
#index.name.value = value to add
Note: For key and value , you can use any text or the
value of a webber variable (for example (Page))
For example , assuming that all the webber pages contains an
#owner variable, we can have an index showing the owner of
each page .
#index.name= owner
#index.owner.type= simple
#index.owner.file = (REPOSITORIO/WWW/aux/index.owner.idx)
#index.owner.key = (urlpage)
#index.ownervalue = owner
If we want to have an index listing the owner of the pages
as the key.
How to use this processor.
1. Add the Index::AddIndex to the list of processor to be running
with webber.