Sparse: HTML Tag Reference
Here's
a rundown of all the fun things you can do with Sparse.
There aren't many tags (which is good) but there are lots of
attributes, allowing you to customize your template to the nth degree.
Have fun!
- enum - the citizens of an enumset.
- enumset - allows you to replace
cryptic SQL-stored values with more readable ones.
- sqlaction - is replaced by a button
representing actions such as "add", "delete", "sort", "reset", etc.
- sqlerror - indicates where
field-specific error messages should go within a row.
- sqlfield - is replaced by a widget or
text representing a data value.
- sqlgoto - prints a form allowing the
user to select specific rows to view.
- sqlinclude - allows you to include
other tags and enumsets from another file.
- sqlmessage - indicates where the
template-wide message should go.
- sqlnavigation - is replaced by a
set of navigation links.
- sqlresults - allows you to print a
message like "Showing X to Y of Z total results."
- sqlrow - encloses the area which should
repeat for each row of data.
- sqlrowerror - indicates where an
SQL error message should go.
- sqlsearch - prints a search form.
- sqlsort - prints a sort form.
- sqltemplate - defines basic
information about a template.
Common Attributes
The following attributes can be used on any Sparse tag (see Referencing Tags in the documentation for
more information).
id
Values: Any string.
This identifies the tag for use in the ref
attribute of another tag. If the id is set
to default, it will be referenced in every
tag with the same name.
ref
Values: Any valid previously defined ID, or a comma-delineated list of
IDs.
This references the tag with the given ID. Any attribute defined in the
references tag will be automatically appended to the current one (if
the current one also has those attributes, they will overwrite the
references attributes).
If this attribute is given a list of IDs rather than a single ID, the
attributes of all of them
will be included. The later IDs will supercede the previous ones. for mo
hidden
Values: true | false
Default: Depends
If this is true, the tag will not be treated as a Sparse tag when
parsing. This is useful for tags which are only meant to define values
to be used elsewhere by using the id
attribute.
NOTE: By default, hidden is false; however, in the following situations, it
will be true by default and you'll have to
set hidden="false"
to display it:
- For tags whose id is default
- For tags which are included from another file via an sqlinclude tag.
Previous: Ajax | Tag
Reference | Next: Example
Template