* list item
** sub list item
* list item
** <$list filter="[tag[foo]]"><$transclude field="text" mode="block"/></$list>
<ul>
<li>list item</li>
<li><ul>
<li>list item
<ul><li>sub list item</li></ul>
</li>
</li></ul>
</ul>
* list item
** list item
*** sub list item
<ul>
<li>list item
<ul>
<li>list item
<ul><li>sub list item</li></ul>
</li>
</ul>
</li>
</ul>
* list item<$list filter="[tag[foo]]"><$transclude field="text" mode="block"/></$list>
Try this for tiddler B:* list item<$list filter="[tag[foo]]"><$transclude field="text" mode="block"/></$list>
The kind of markup you suggested works, of course, but it's counterintuitive and it's hard to see clearly the structure of the outline.
And it's hard for me to understand what you mean. Maybe you best show some real life examples?
* cupcake ingredients
** flour
** sugar
** cocoa
** olive oil
** baking soda
** ...
* cupcake reciepe
**{{cupcake ingredients}}
** directions
*** make some delicious cupcakes
- cupcake reciepe
- cupcake ingredients
- flour
- sugar
- cocoa
- olive oil
- baking soda
- ...
- directions
- make some delicious cupcakes
* shopping list
**{{cupcake ingredients}}
Obviously this can be solved by copypasting lists around, but even in this simple case it is helpful to have not redundancies but linking do the work. After all, if I decide to list "salt" under "ingredients" but forget to add it to the shopping list, I would bake myself some tasteless cupcakes, because I tend to be a mindless list-following groceries shopper...
- shopping list
- cupcake ingredients
- flour
- sugar
- cocoa
- olive oil
- baking soda
- ..
* item
** {{[tag[pro]]}}
** preceding each item, additionally stripping each * in the included lists and adding ** to every subitem in these lists. So if there was a tiddler "list" tagged with "pro":
* fact 1
** explanation of fact 1
*** some subitem of explanation
{{[tag[pro]]}} like a loop with additional input pre-processing:
for each tiddler with tag "pro":
return
each line with additionally (current level-1) asterisks prepended if it is a list item OR
each line with additionally (current level) asterisks if there are no list items in the tiddler
* item
<<include-lists "**" "[tag[pro]]">>
.
* item
**<<subitem-each [tag[pro]]>>
Does this all look silly to you? Do you understand better now what I mean?
Best,* cupcake reciepe{{
cupcake ingredients||listTransclude
}}
** directions
*** make some delicious cupcakes* Cupcake Reciepe
** {{ Cupcake Ingredients||asList }}
** directions
*** make some delicious cupcakesCode hier eingeben...* flour
* sugar
* cocoa
* olive oil
* baking soda