[tw] Re: TW5 beginners question: template to render link+content?

2015-01-22 Thread Tobias Beer
And if the chapters are really named chapter # \define chapter() chapter $(chaptNo)$ $list filter=[removeprefix[chapter ]nsort[title]] variable=chaptNo !$link to=chapter$text text=chapter//$link $transclude tiddler=chapter/ /$list Very clever! First remove the prefix, then add it back

[tw] Re: TW5 beginners question: template to render link+content?

2015-01-22 Thread Stephan Hradek
Am Montag, 19. Januar 2015 19:13:45 UTC+1 schrieb Tobias Beer: Hi Joerg, A yet simpler way... And if the chapters are really named chapter # \define chapter() chapter $(chaptNo)$ $list filter=[removeprefix[chapter ]nsort[title]] variable=chaptNo !$link to=chapter$text

[tw] Re: TW5 beginners question: template to render link+content?

2015-01-19 Thread Tobias Beer
Furthermore, you could wrap it up in a macro and pass any desired chapter filter as a parameter. Very nice. I actually went ahead and did just that... Creating A Document Of Tiddlers @ tb5 http://tb5.tiddlyspot.com/#Creating%20A%20Document%20Of%20Tiddlers or... makedoc @ tb5

[tw] Re: TW5 beginners question: template to render link+content?

2015-01-19 Thread RichShumaker
Thanks Tobias and Astrid and Alberto and especially Joerg for asking how to do this, This will be really helpful for the main project I am working on. Rich Shumaker -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To unsubscribe from this group

[tw] Re: TW5 beginners question: template to render link+content?

2015-01-19 Thread Astrid Elocson
Hi Joerg, You can do this either way. The template could say: *! {{!!title}}{{!!text}}* (The template itself then displays a recursive transclusion error, but that's normal in such cases: the template's text is including itself, ad infinitum.) Or you could use a macro: *\define

[tw] Re: TW5 beginners question: template to render link+content?

2015-01-19 Thread Joerg Plewe
Thank you Alberto, got the idea, looks pretty clean :). . J Am Montag, 19. Januar 2015 15:55:50 UTC+1 schrieb Alberto Molina: Hi Jörg, Is this feasible and the way to go? Or do I need a macro instead? Its easy, and no need of a macro. Put the following in your chaptertemplate

[tw] Re: TW5 beginners question: template to render link+content?

2015-01-19 Thread Alberto Molina
Hi Jörg, Is this feasible and the way to go? Or do I need a macro instead? Its easy, and no need of a macro. Put the following in your chaptertemplate tiddler: !$link$view field=title//$link $transclude/ Then use in your book tiddler: {{chapter1||chaptertemplate}}

[tw] Re: TW5 beginners question: template to render link+content?

2015-01-19 Thread Joerg Plewe
Alberto, Is there a way to avoid the 'Recursive transclusion error in transclude widget' error message in the template itself? . J Am Montag, 19. Januar 2015 15:55:50 UTC+1 schrieb Alberto Molina: Hi Jörg, Is this feasible and the way to go? Or do I need a macro instead? Its easy, and

[tw] Re: TW5 beginners question: template to render link+content?

2015-01-19 Thread Astrid Elocson
Hi Jörg, $transclude/ Or, as I suggested, *{{!!text}}*, which avoids the need for an explicit widget, and is very slightly shorter :) Is there a way to avoid the 'Recursive transclusion error in transclude widget' error message in the template itself? Not really, because when you view the

[tw] Re: TW5 beginners question: template to render link+content?

2015-01-19 Thread Tobias Beer
Hi Joerg, A yet simpler way... Creating A Document Of Tiddlers @ tb5 http://tb5.tiddlyspot.com/#Creating%20A%20Document%20Of%20Tiddlers $list filter= [[Chapter 1]] [[Chapter 2]] [[Chapter 3]] !$link$view field=title//$link {{!!text}} /$list Best wishes, Tobias. -- You received this

[tw] Re: TW5 beginners question: template to render link+content?

2015-01-19 Thread Astrid Elocson
Tobias's method is the most idiomatic, because it uses a filter to select the chapters. Furthermore, you could wrap it up in a macro and pass any desired chapter filter as a parameter. Very nice. – æ -- You received this message because you are subscribed to the Google Groups TiddlyWiki