2.29. flag
Controls Interchange flags. For example, flags affect database access and transactions for those databases able to support these features. See also the [tag] tag.
2.29.1. Summary
Parameters: type
type may be one of the following
- read
- Flags the table read-only
- write
- Flags the table writeable by default (or read-only if you also set the value=0 attribute)
- transactions
- commit
- Attempts to commit transactions
- rollback
- Attempts to rollback transactions
- build
- Forces build of static Interchange page specified by the name attribute
- checkhtml
2.29.2. Attributes
- 'flag' and 'name'
- Aliases for 'type' (except for 'type=build')
- tables
- The name of the table to flag
- 'table' is an alias
- value
- The boolean value of the flag
- name
- Name of page to build or alias for 'type'
- show
- Normally, the [flag] tag returns nothing to the page. Setting 'show=1' causes the tag to return status, if any.
Must pass named parameter interpolate=1 to cause interpolation.
Invalidates cache: YES
Called Routine:
ASP-like Perl call:
$Tag->flag( { type => VALUE, } ) OR $Tag->flag($type, $ATTRHASH);
Attribute aliases
flag ==> type name ==> type table ==> tables
2.29.3. Description
The flag tag controls database access and transactions.
If a DBM-based database is to be modified, it must be flagged writable on the page calling the write tag.
For example, you can call
[flag type=write value=1 table=products]
to mark the products DBM database writable. This must be done before ANY access to that table.
Note that SQL databases are always writable if allowed by the SQL database itself, and in-memory databases will never be written.
Using [flag build] forces static build of a page, even if it contains dynamic elements.