Re: [tw] Re: Use template in $:/core/ui/ViewTemplate as view template in tabs macro

2016-08-30 Thread Jeremy Ruston
Hi Danielo

> An alternative, and probably easier solution would be to just use a template 
> like this:
> 
> <$tiddler tiddler=<>>
> <$transclude tiddler="$:/core/ui/ViewTemplate"/>
> 
> 

That’s correct. We can’t change the tabs macro to store the current tab in the 
currentTiddler variable because it would break all the places where the tabs 
macro needs to be used without modifying the current tiddler. For example, in 
the info panel the currentTiddler is the tiddler being displayed, and we use 
the tabs macro to transclude the individual tabs. The content of those tabs 
needs to be able to operate on the currentTiddler to display the correct 
information.

Best wishes

Jeremy

> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to tiddlywiki+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to tiddlywiki@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/tiddlywiki 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/9a826297-2e37-44b4-b19b-4cd54035a486%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/E7338A62-B0E8-417B-843A-E00A2846AF9B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Use template in $:/core/ui/ViewTemplate as view template in tabs macro

2016-08-30 Thread Danielo Rodríguez
An alternative, and probably easier solution would be to just use a 
template like this:

<$tiddler tiddler=<>>
<$transclude tiddler="$:/core/ui/ViewTemplate"/>



-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9a826297-2e37-44b4-b19b-4cd54035a486%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Use template in $:/core/ui/ViewTemplate as view template in tabs macro

2016-08-30 Thread Danielo Rodríguez

Hello Tobias,

I have modified the tabs macro this way for easier comparison here is a 
diff https://www.diffchecker.com/tXBz8Q8L):

\define tabs-cool(tabsList,default,state:"$:/state/tab",class,template)


<$list filter="$tabsList$" variable="currentTab"><$set 
name="save-currentTiddler" value=<>><$tiddler 
tiddler=<>><$button set=<> 
setTo=<> default="$default$" selectedClass="tc-tab-selected" 
tooltip={{!!tooltip}}>
<$tiddler tiddler=<>>
<$set name="tv-wikilinks" value="no">
<$transclude tiddler=<> field="caption">
<$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/>





<$list filter="$tabsList$" variable="currentTab">

<$reveal type="match" state=<> text=<> 
default="$default$">

<$tiddler tiddler=<>>
<$transclude tiddler="$template$" mode="block">








\end


Basically I have added a $tiddler widget to set the currentTiddler to the 
current tab before the template transclusion. I have also removed the 
second transclusion of the current tab. To be honest, I never saw that way 
of using a template: transcluding the template and then transcluding the 
tiddler inside it.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9708ed08-222c-4de1-bb2e-2136deaa165d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Use template in $:/core/ui/ViewTemplate as view template in tabs macro

2016-08-30 Thread Danielo Rodríguez
I have been thinking about this... Maybe it's because I'm using the tabs macro 
as a component of the view template (tagged with the appropriate tag). But I'm 
not sure if this happens in a regular tiddler. Because of what you exposed, I 
think the result would be the same 

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3a1a46de-723f-48bb-81b6-b50df0fc7541%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Use template in $:/core/ui/ViewTemplate as view template in tabs macro

2016-08-30 Thread Danielo Rodríguez
Thanks Tobias, 

So in order to fix this, the tabs macro should modify the current tiddler 
variable to the selected tab, right? 

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e7f7c838-0293-4007-bcf1-e425e189591a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Use template in $:/core/ui/ViewTemplate as view template in tabs macro

2016-08-29 Thread Tobias Beer
Hi Danielo,
 

> {{HelloThere||$:/core/ui/ViewTemplate}}
>

I imagine this doesn't work,
because the tabs macro 
 runs with a variable 
currentTab,
leaving currentTiddler untouched.
And that is probably why the following
will give you a recursion error for each tab:

<>

Recursive transclusion error in transclude widget

Since you're obviously already rendering the ViewTemplate for 
currentTiddler,
which is where the tabs macro is in.

Best wishes,

Tobias.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d6a1832a-f074-4323-ac61-86632bb85083%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.