What's a bag? And what's a TiddlyWebAdaptor?

I wanted to find out what a ‘bag’ was (in trying to figure out ways to organise posts), and search lead me to this tiddler


which says:

The TiddlyWebAdaptor uses a few more fields:

|bag|The name of the bag from which a tiddler came|

Which doesn’t tell me a lot about what bags are for, and the TiddlyWebAdaptor tiddler doesn’t exist. Is anyone able to shed any light on these mysteries?

Welcome to the talk.tiddlywiki forum!

The best recent thread here to start with (for orienting to the new developments that make use of “bags” of tiddlers) is this one:

1 Like

Welcome to talk.tiddlywiki @a7ndrew

I don’t think you need to go that way. Perhaps describe the problem you want to solve, to organise posts. Are they or could they be tiddlers?

FYI Revision field, who is using this? Should I use it? · Jermolene/TiddlyWiki5 · Discussion #7719 · GitHub

I’ve made an update to tiddlywiki.com to try to address this gap. You can see the changes on GitHub, and they will be live in a few minutes here:


I’ve pasted the material about bags and recipes below.

The bags and recipes model is a reference architecture for how tiddlers can be shared between multiple wikis. It was first introduced by TiddlyWeb in 2008.

The principles of bags and recipes can be simply stated:

  1. Tiddlers are stored in named “bags”
  2. Bags have access controls that determines which users can read or write to them
  3. Recipes are named lists of bags, ordered from lowest priority to highest
  4. The tiddlers within a recipe are accumulated in turn from each bag in the recipe in order of increasing priority. Thus, if there are multiple tiddlers with the same title in different bags then the one from the highest priority bag will be used as the recipe tiddler
  5. Wikis are composed by splicing the tiddlers from the corresponding recipe into the standard TW5 HTML template

A very simple example of the recipe/bag model might be for a single user who maintains the following bags:

  • recipes - tiddlers related to cooking recipes
  • work - tiddlers related to work
  • app - common tiddlers for customising TiddlyWiki

Those bags would be used with the following recipes:

  • recipes –> recipes, app - wiki for working with recipes, with common custom components
  • work –> work, app - wiki for working with work, with common custom components
  • app –> app - wiki for maintaining custom components

All of this will work dynamically, so changes to the app bag will instantly ripple into the affected hosted wikis.

A more complex example might be for a teacher working with a group of students:

  • student-{name} bag for each students work
  • teacher-course bag for the coursework, editable by the teacher
  • teacher-tools bag for custom tools used by the teacher

Those bags would be exposed through the following hosted wikis:

  • student-{name} hosted wiki for each students work, including the coursework material
  • teacher-course hosted wiki for the coursework, editable by the teacher
  • teacher hosted wiki for the teacher, bringing together all the bags, giving them an overview of all the students work