WPP 2.13.1.35 - The Web Preprocessor
Author: Marco Lamberto |
||
Index | < Previous Next > |
The standard macro library wpplib |
A simple content managing system oriented macro library |
... <!-- absoulte path --> @RURL("/images/null.gif")@ ... <!-- relative path --> @RURL("images/pp_by_wpp.gif")@ ...
... <!-- absoulte path --> ../images/null.gif ... <!-- relative path --> images/pp_by_wpp.gif ...
Using wpplib |
...
@DEFAULT_TMPLPATH=templates:/usr/share/wpp@
...
wpp -D DEFAULT_TMPLPATH=templates:/usr/share/wpp -Once you've set up the template paths you can include safely wpplib.
... @INCLUDE wpplib@ ...
The macros exported by wpplib |
Macro | Description |
---|---|
@WPPLIB_VERSION()@ |
Returns wpplib version. |
@FIXME()@ @FIXME(TEXT)@ |
A simple macro that creates a red bordered box containing FIXME and the optional TEXT message. |
@NULL()@ @NULL(SIZE)@ @NULL(WIDTH, HEIGHT)@ |
It's used to wrap a 1x1 pixels transparent gif in order to expand to the
wanted size (useful for filling spaces or forcing table sizes).
The first version generates an 1x1 image, the second version generates a square SIZExSIZE transparent image. The image is by default the relativized url for '/images/null.gif', you can customize it by setting the variable @NULL_IMAGE@ with the proper url. |
@RURL(PATH)@ @RURL(PATH, NODEPS)@ |
Return the relativized path.
If NODEPS is defined (not an empty string) dependencies will not be generated. Note: RURL it's now a built-in macro since it's user internally by wpp for the other built-in macros. |
@RLINK(URL)@ @RLINK(TEXT, URL)@ @RLINK(TEXT, URL, TARGET)@ @RLINK(TEXT, URL, TARGET, EXTRA)@ @RLINK(TEXT, URL, TARGET, EXTRA, NODEPS)@ |
Generates an "a href" tag. The EXTRA parameter is used for inserting
other parameters into the first "a" part.
The URL, if it's a path, is relativized. If NODEPS is defined (not an empty string) dependencies will not be generated. |
@RIMAGE(IMG)@ @RIMAGE(IMG, ALT)@ @RIMAGE(IMG, ALT, EXTRA)@ @RIMAGE(IMG, ALT, EXTRA, URL)@ @RIMAGE(IMG, ALT, EXTRA, URL, NOURLDEP)@ |
Generates an "img" tag. The EXTRA parameter is used for inserting
other parameters.
The IMG, if it's a path, is relativized. |
@RCSS_LINK(CSSFILE)@ @RCSS_LINK(CSSFILE, MEDIA)@ @RCSS_STYLE(CSSFILE)@ @RCSS_STYLE(CSSFILE, MEDIA)@ |
Include a style sheet file reference using a "link" or a "style" tag. |
^ Top | < Previous Next > | |
Marco (LM) Lamberto lm@sunnyspot.org
Revised: 2003/06/08 11:49:02 http://wpp.sf.net/manual_9.html |