A bag is a container of uniquely named
tiddlers. A bag can have rules for who can edit, delete or read the tiddlers in the bag, defined in a
policy.
A bag may also have a description field, containing text that may describe the purpose of the bag or the meaning of the tiddlers contained within.
The combination of a bag's name and a tiddler's name creates the unique distinguishing name for a tiddler on a server.
You can create and manage bags through the
HTTP API or with
twanager.
See also
What is a bag for?.
Attributes
- name
- The name of the bag.
- desc
- The description of the bag.
- policy
- The policy associated with the bag. The default policy allows anyone to do anything with the bag.
Notes
The internal object representation of a bag in
TiddlyWeb has a few different flavors. Each of these flavors are there to control some behaviors in different situations. The flavors are:
- default
- When a tiddler is added to a bag the bag attribute is set to the name of the bag to which the tiddler is being added. The uniqueness identifier for the tiddler is the name of the tiddler.
- tmpbag
- When a tiddler is added to a tmpbag, the bag attribute on the tiddler is not changed,
- revbag
- When a bag is a revbag, it will be serialized differently from a default bag: revision information will be shown.
- searchbag
- When a bag is a searchbag, it will be serialized with different title information.
Knowing these differences is useful if you are writing extensions that use bags.