I'll take a stab a this.  I do something like that with the toggletag plugin 
and the foreachtiddler plugin
http://mptw.tiddlyspot.com/#ToggleTagPlugin
http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin

Make the tiddlers that include the standard language, and tag them SectionOne 
or SectionTwo for example if you have sections in your document.  So you would 
make one named ServiceA tagged SectionOne, another named ServiceB tagged 
SectionOne, and a third one named ServiceC tagged SectionTwo.  Make these 
tiddler names single words.

You would next make a tiddler to start with (MainDocOptions) that listed all 
the options for your document using the toggletag plugin
!!Section 1
<<toggleTag MainDocInclude ServiceA 'Service A - Include Thing 1'>>
<<toggleTag MainDocInclude ServiceB 'Service B - Include Thing 1 with Option 
for 2'>>
!!Section 2
<<toggleTag MainDocInclude ServiceC 'Service C - Include Thing 1 and 2 with 
Option for 3'>>

That says to call the toggletag plugin, and add the tag MainDocInclude to the 
tiddler ServiceA if the checkbox is checked.  The instructions in the single 
quotes can remind you what that option includes.  

You check the ones you want.  So you check the first and third one, and the 
plugin adds the tag "MainDocInclude" to tiddlers ServiceA and ServiceC.

At the bottom of the MainDocOptions tiddler, link to the MainDoc tiddler for 
convenience.

In your MainDoc tiddler, use the foreachtiddler plugin
(see http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin for syntax 
examples)

!!Section One
<<forEachTiddler 
 where 'tiddler.tags.containsAll(["MainDocInclude","SectionOne"])'
 sortBy 'tiddler.title'
 write '""+tiddler.text+"\n\n"' 
>>
(this creates a header named Section One and then inserts the text in tiddler 
ServiceA, which you checked above, and a blank line... but not the text from 
the tiddler ServiceB)
!!Section Two
<<forEachTiddler 
 where 'tiddler.tags.containsAll(["MainDocInclude","SectionTwo"])'
 sortBy 'tiddler.title'
 write '"[["+tiddler.title+"]]\n\n"' 
>>
(this creates a header named Section Two and then inserts the text in tiddler 
ServiceC, which you checked above, and a blank line).

There may be an easier way to do this... But this is a start.  

Read the foreachtiddler examples, as you can do some cool stuff, for example, 
using the (index < 1) ? code you can use the foreachtiddler to write the 
Section Two heading -only- if you checked one of the section two options...

The foreachtiddler plugin is probably my favorite one :)
Hope this helps

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/tiddlywiki/-/3Z8hTo1NUDMJ.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to