title: MultiWikiServer Administration \procedure createBag(name,description,errorTiddler) \procedure completion-createBag() \import [subfilter{$:/core/config/GlobalImportFilter}] <$action-log status=<> statusText=<> error=<> data=<> headers=<> /> <%if [match[]] %> <$action-setfield $tiddler=<> text=""/> <$action-sendmessage $message="tm-server-refresh"/> <%else%> <$action-setfield $tiddler=<> text=<>/> <%endif%> \end completion-createBag <$action-sendmessage $message="tm-http-request" url=`/wiki/$(name)$/bags/$(name)$` method="PUT" body=`{"description":"${ [encodeuricomponent[]] }$"}` oncompletion=<> var-errorTiddler=<> /> \end createBag \procedure createBagButton(name) \whitespace trim
<$text text="Create a new bag"/>
<$edit-text tiddler="$:/state/NewBagName" tag="input" placeholder="(bag name)" class="mws-form-field-input"/>
<$edit-text tiddler="$:/state/NewBagDescription" tag="input" placeholder="(description)" class="mws-form-field-input"/>
<%if [[$:/state/NewBagError]get[text]else[]!match[]] %>
<$text text={{$:/state/NewBagError}}/>
<%endif%>
<$button class="mws-form-button"> <$transclude $variable="createBag" name={{$:/state/NewBagName}} description={{$:/state/NewBagDescription}} errorTiddler="$:/state/NewBagError" /> Create Bag
\end createBagButton \procedure createRecipe(name,bag_names,description,errorTiddler) \procedure completion-createRecipe() \import [subfilter{$:/core/config/GlobalImportFilter}] <%if [match[]] %> <$action-setfield $tiddler=<> text=""/> <$action-sendmessage $message="tm-server-refresh"/> <%else%> <$action-setfield $tiddler=<> text=<>/> <%endif%> \end completion-createRecipe \procedure emptyArray() [] \function createRecipeJson() [enlist-input[]] :reduce[!match[]elsejsonset,] \end createRecipeJson <$action-sendmessage $message="tm-http-request" url=`/wiki/$(name)$/recipes/$(name)$` method="PUT" body=`{"bag_names":${ [] }$,"description":"${ [encodeuricomponent[]] }$"}` oncompletion=<> var-errorTiddler=<> /> \end createRecipe \procedure createRecipeButton() \whitespace trim
<$text text="Create a new recipe"/>
<$edit-text tiddler="$:/state/NewRecipeName" tag="input" placeholder="(recipe name)" class="mws-form-field-input"/>
<$edit-text tiddler="$:/state/NewRecipeBagNames" tag="input" placeholder="(space separated list of bags)"/>
<$edit-text tiddler="$:/state/NewRecipeDescription" tag="input" placeholder="(description)" class="mws-form-field-input"/>
<%if [[$:/state/NewRecipeError]get[text]else[]!match[]] %>
<$text text={{$:/state/NewRecipeError}}/>
<%endif%>
<$button class="mws-form-button"> <$transclude $variable="createRecipe" name={{$:/state/NewRecipeName}} bag_names={{$:/state/NewRecipeBagNames}} description={{$:/state/NewRecipeDescription}} errorTiddler="$:/state/NewRecipeError" /> Create Recipe
\end createRecipeButton \procedure bagPill(element-tag:"span",is-topmost:"no") \whitespace trim <$genesis $type=<> class={{{ mws-bag-pill [match[yes]then[mws-bag-pill-topmost]] +[join[ ]] }}}> <$image source=`/wiki/${ [{!!bag-name}encodeuricomponent[]] }$/bags/${ [{!!bag-name}encodeuricomponent[]] }$/tiddlers/%24%3A%2Ffavicon.ico` class="mws-favicon-small" > <$image source="$:/plugins/multiwikiserver/images/missing-favicon.png" class="mws-favicon-small" /> <$text text={{!!bag-name}}/> \end \procedure wikiCard() \whitespace trim
<$image source=`/wiki/${ [{!!recipe-name}encodeuricomponent[]] }$/recipes/${ [{!!recipe-name}encodeuricomponent[]] }$/tiddlers/%24%3A%2Ffavicon.ico` class="mws-favicon" > <$image source="$:/plugins/multiwikiserver/images/missing-favicon.png" class="mws-favicon" />
<$text text={{!!recipe-name}}/>
<%if [list] %>
    <$list filter="[list]" counter="counter"> <$transclude $variable="bagPill" is-topmost={{{ [match[yes]] }}} element-tag="li"/>
<%else%> (no bags defined) <%endif%>
<$text text={{!!text}}/>
\end

Wikis

These are the wikis available on this server. Click on a wiki to visit it in a new browser tab.

    <$list filter="[prefix[$:/state/MultiWikiServer/recipes/]]">
  • <>
<>
Higher numbered bags take priority if a tiddler with the same title is in more than one bag

Bags

    <$list filter="[prefix[$:/state/MultiWikiServer/bags/]]">
  • <> <$text text={{!!text}}/>
<>