From 2f21cbc971c43595d4fe2691dd6db9584b7217d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Rodr=C3=ADguez=20Rivero?= Date: Wed, 4 Jan 2017 22:40:11 +0100 Subject: [PATCH] Updated tabs macro documentation (#2697) Adding how to deal with transclusions inside the tabs itself. It is not weird that you want use tabs on a set of tiddlers that transclude other tiddlers using their own title. If you don't understand well the consequences of of what the sentence `currentTiddler variable is not affected...` this can be quite frustrating. --- editions/tw5.com/tiddlers/macros/TabsMacro.tid | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/macros/TabsMacro.tid b/editions/tw5.com/tiddlers/macros/TabsMacro.tid index 0119afda2..f11f27c90 100644 --- a/editions/tw5.com/tiddlers/macros/TabsMacro.tid +++ b/editions/tw5.com/tiddlers/macros/TabsMacro.tid @@ -26,6 +26,12 @@ By default the tabs are arranged horizontally above the content. To get vertical Within the template, the title of the selected tab is available in the <<.var currentTab>> variable. -The <<.vlink currentTiddler>> variable is not affected by the <<.var tabs>> macro. +The <<.vlink currentTiddler>> variable is not affected by the <<.var tabs>> macro. This can put you in trouble if the list of tabs includes tiddlers that depend on the value of the <<.vlink currentTiddler>>, for example tiddlers listing children based on its own name. To overcome this problem you can use a [[TemplateTiddler|TemplateTiddlers]] like the following: + +``` +<$tiddler tiddler=<>> +<$transclude mode="block" /> + +``` <<.macro-examples "tabs">>