[tw] Re: [TW5] Wikitext: using Transclusion as Link Target

2016-12-11 Thread Riz


If anyone is not very particular about having those two buttons inside the 
tabbed structure, you can just add <$button 
to={{$:/temp/toc/selectedTiddler}}>Yo anywhere in your tiddlywiki 
and achieve the same result. Has the advantage of not having to redefine 
the whole macro and probably having the button on sidebar. 

-- 
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/b949c317-f304-4be2-80dc-fdf6d0364c66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Wikitext: using Transclusion as Link Target

2016-12-11 Thread Mat
@grundyunderhill
Thanx for sharing but forgive my dull brain - could you please post an 
actual example of this?
To simplify for you, I put up this on 
tiddlyspot (password: password) which includes some dummy tiddlers tagged 
"tag1".
Would be appreciated.

<:-)




On Saturday, December 10, 2016 at 7:54:59 AM UTC+1, grundyunderhill wrote:
>
> Hi all,
> Not sure whether anyone is still following this thread; if so, maybe 
> you'll find this interesting.
>
> Ton Gerner was kind enough to point me here, in response to a question I 
> posed a few days ago, essentially looking to do same thing as Alex -- 
> create a link to open the current tiddler from a *toc-tabbed-internal-nav* 
> into the main story river.  I envisioned it being part of a template 
> tiddler, but couldn't figure out how to override the link-trapping 
> functionality of the macro.
>
> Based on the conversation here, though, I gleaned enough knowledge to do 
> something just as cool: an adapted version of the macro with the "break 
> out" link built into the right-hand pane.  In short, I've borrowed Tobias' 
> solution for creating the link, and paired it with a tweaked copy of the 
> *toc-tabbed-external-nav* macro.
>
> *toc-tabbed-external-nav* became the basis because that's where the 
> two-pane structure is defined -- *toc-tabbed-internal-nav* simply wraps a 
> call to this with a *<$linkcatcher>* widget.  My tweak places 
> *<$linkcatcher>* directly around transcluded content within the 
> right-hand pane instead, so that additional links, etc may be added outside 
> the *<$linkcatcher>* but still within the pane.  So altogether we have 
> this:
>
> \define tocTools( to )
> @@.tocTools
> <$button to="$to$">{{$:/core/images/link}}
> <$button to="$to$" 
> message="tm-edit-tiddler">{{$:/core/images/edit-button}}
> @@
> \end
>
> \define smokeMirrors( selected )
> <$macrocall $name="tocTools" to={{$selected$}}/>
> \end
>
> \define toc-tabbed-internal-nav-gu( tag, sort:"", 
> selectedTiddler:"$:/temp/toc/selectedTiddler", unselectedText, missingText, 
> template:"" )
> <$tiddler tiddler={{$selectedTiddler$}}>
>   
> <$linkcatcher to="$selectedTiddler$">
>   
> <$macrocall $name="toc-selective-expandable" tag="""$tag$""" 
> sort="""$sort$""" itemClassFilter=< selectedTiddler:"""$selectedTiddler$""">>/>
>   
> 
> 
>   <>
>   <$linkcatcher to="$selectedTiddler$">
> <$reveal state="""$selectedTiddler$""" type="nomatch" text="">
>   <$transclude mode="block" tiddler="$template$">
> <>
> <$transclude mode="block">$missingText$
>   
> 
> <$reveal state="""$selectedTiddler$""" type="match" text="">
>   $unselectedText$
> 
>   
> 
>   
> 
> \end
>
> ...which provides both "navigate" and "edit" links for the current tiddler 
> as buttons.  The *.tocTools* style wrapping the buttons can be defined 
> however you like, of course.  I have them floating right, with a small top 
> margin to put some space between them and the pane border.
>
> Muchos gracias, Tobias and Eric, for the hints about deferred linking and 
> the macros' use of *<$linkcatcher>*.  Hope my take on the solution will 
> be helpful to someone too.  Maybe one of these days I'll package it up as a 
> plug-in...
>

-- 
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/e6b1f2c6-6fa4-475e-9f83-80b6941456b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Wikitext: using Transclusion as Link Target

2016-12-09 Thread grundyunderhill
Hi all,
Not sure whether anyone is still following this thread; if so, maybe you'll 
find this interesting.

Ton Gerner was kind enough to point me here, in response to a question I 
posed a few days ago, essentially looking to do same thing as Alex -- 
create a link to open the current tiddler from a *toc-tabbed-internal-nav* 
into the main story river.  I envisioned it being part of a template 
tiddler, but couldn't figure out how to override the link-trapping 
functionality of the macro.

Based on the conversation here, though, I gleaned enough knowledge to do 
something just as cool: an adapted version of the macro with the "break 
out" link built into the right-hand pane.  In short, I've borrowed Tobias' 
solution for creating the link, and paired it with a tweaked copy of the 
*toc-tabbed-external-nav* macro.

*toc-tabbed-external-nav* became the basis because that's where the 
two-pane structure is defined -- *toc-tabbed-internal-nav* simply wraps a 
call to this with a *<$linkcatcher>* widget.  My tweak places 
*<$linkcatcher>* directly around transcluded content within the right-hand 
pane instead, so that additional links, etc may be added outside the 
*<$linkcatcher>* but still within the pane.  So altogether we have this:

\define tocTools( to )
@@.tocTools
<$button to="$to$">{{$:/core/images/link}}
<$button to="$to$" 
message="tm-edit-tiddler">{{$:/core/images/edit-button}}
@@
\end

\define smokeMirrors( selected )
<$macrocall $name="tocTools" to={{$selected$}}/>
\end

\define toc-tabbed-internal-nav-gu( tag, sort:"", 
selectedTiddler:"$:/temp/toc/selectedTiddler", unselectedText, missingText, 
template:"" )
<$tiddler tiddler={{$selectedTiddler$}}>
  
<$linkcatcher to="$selectedTiddler$">
  
<$macrocall $name="toc-selective-expandable" tag="""$tag$""" 
sort="""$sort$""" itemClassFilter=<>/>
  


  <>
  <$linkcatcher to="$selectedTiddler$">
<$reveal state="""$selectedTiddler$""" type="nomatch" text="">
  <$transclude mode="block" tiddler="$template$">
<>
<$transclude mode="block">$missingText$
  

<$reveal state="""$selectedTiddler$""" type="match" text="">
  $unselectedText$

  

  

\end

...which provides both "navigate" and "edit" links for the current tiddler 
as buttons.  The *.tocTools* style wrapping the buttons can be defined 
however you like, of course.  I have them floating right, with a small top 
margin to put some space between them and the pane border.

Muchos gracias, Tobias and Eric, for the hints about deferred linking and 
the macros' use of *<$linkcatcher>*.  Hope my take on the solution will be 
helpful to someone too.  Maybe one of these days I'll package it up as a 
plug-in...

-- 
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/7680949f-3207-4963-b4c3-572a7171e315%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Wikitext: using Transclusion as Link Target

2016-12-07 Thread 'Mark S.' via TiddlyWiki
I didn't see this thread when I was attempting something similar the other 
day.

I just hacked the code. Put one line below the  tags:

<$link>Link

What would be more ideal is if you could pass a template to the macro. Then 
you could structure the tiddlers however you wanted without changing the 
original macro.

What I currently want is a "New Here" button right inside the TOC tiddler, 
allowing it to act somewhat like WorkFlowy.

Mark

On Wednesday, January 6, 2016 at 3:07:04 AM UTC-8, Alex H wrote:
>
> Hey guys,
>
> I think I'm pretty close to a solution here, but I can't figure it out...
>
> *Short problem description:*
>
> I want to make a link to a tiddler where the target is the content of 
> another tiddler.
> So let's say I have the tiddler named "A" with content "B" and I have a 
> tiddler named "B" with some content. As you might have noticed the 
> title/name of tiddler "B" is equivalent to the content of the tiddler "A".
> So, I'd like to link to tiddler B by doing something like this:
> [[ a link to tiddler B|{{A}}]]
>
> Clicking on that link results in "Missing tiddler "{{A}}" - click to 
> create" - so the transclusion isn't resolved.
>
> Any thoughts?
>
>
>
> *Long problem description:*
>
> There is a good chance that I'm going on this problem the wrong way, so 
> let me explain what I'm trying to do:
>
> I have a Table of Contents Tiddler, as described here 
> http://tiddlywiki.com/static/Example%2520Table%2520of%2520Contents%253A%2520Tabbed%2520Internal.html
>
> I use this tiddler quite often to browse around and do some quick lookups. 
> And for these quick lookups the internal view is great, but sometimes I 
> want the tiddler I'm looking at in a separate tiddler (for later use or 
> open up multiple tiddlers side by side).
>
> The title of tiddler I'm looking at the moment is in 
> "$:/temp/toc/selectedTiddler", so what I'm trying to do is simply add a 
> link at the bottom of the Table of Contents Tiddler which opens the content 
> of "$:/temp/toc/selectedTiddler" in a seperate tiddler.
> I'm trying to do this like so:
>
> [[Click to open current tiddler sepreately |{{$:/temp/toc/selectedTiddler
> }}]]
>
>
> But the same problem as above occurs...
>
>
> I'm happy for any ideas...
> Thanks 
>
> Edit: I just noticed the Example Table of Contents: Tabbed Internal 
> 
>  on the static tiddlywiki page does not work the same way as on the original 
> page.
> So, in order to better understand my scenario, please go to tiddlywiki.com 
> and search for Example Table of Contents: Tabbed Internal 
> .
>  
>
> Edit 2: haha, I just by accident posted the link the the dynamic page of 
> tiddlywiki - did not know you can link there ;-)
>
>
>

-- 
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/c2455262-92f4-43c0-b105-a52ebc62c39b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Wikitext: using Transclusion as Link Target

2016-01-06 Thread Tobias Beer
Hi Alex,
 

> I want to make a link to a tiddler where the target is the content of 
> another tiddler.
>

Now to the really interesting question: Why do you want to do that?

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/19bc5401-c319-41a1-ab1a-aa47300efcd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Wikitext: using Transclusion as Link Target

2016-01-06 Thread Tobias Beer
Hi Alex,

I want to make a link to a tiddler where the target is the content of 
> another tiddler.


You need a helper macro used as:

<>

The macro...

title: $:/.tb/macros/defer
tag: $:/tags/Macro

\define deferred(title,pretty)
<$reveal type="nomatch" text="""$pretty$""" default="">
[[$pretty$|$title$]]

<$reveal type="match" text="""$pretty$""" default="">
[[$title$]]

\end

\define defer(title,pretty)
<$macrocall $name="deferred" title={{$title$}} pretty="""$pretty$"""/>
\end

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/8feefaf2-f63b-4894-8cd6-3eee849c7539%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Wikitext: using Transclusion as Link Target

2016-01-06 Thread Alex H

Wow, seems like I wasn't so close to a solution after all ;-)
Thanks a lot this works perfectly!!! Crazy stuff!

Now to the really interesting question: Why do you want to do that?
>

Well, I'm using a tiddler with a "tabbed internal - Table of Contents" ( 
http://tiddlywiki.com/#Example%20Table%20of%20Contents%3A%20Tabbed%20Internal 
) quite often (it's actually my home tiddler). 
Most of the time I just browse a little bit, take a quick look at a 
tiddler, do some work and browse to a other tiddler within this home 
tiddler of mine.
But sometimes I want the currently active tiddler of this home tiddler 
opened individually.
So, not inside the table of content tiddler, but opened as a normal 
tiddler, so I can look at multiple tiddlers at the time.
And with your awesome helper macro my Table of Content home tiddler looks 
now like this:
<$macrocall
$name="toc-tabbed-internal-nav"
tag="Contents"
selectedTiddler="$:/temp/toc/selectedTiddler"
unselectedText="Select a topic in the table of contents. Click the 
arrow to expand a topic."
missingText="Missing tiddler."
/>
<>


So, it's now just one click and the current active internal tiddler gets 
opened as an external tiddler.

I'm pretty sure I messed up some of the terminology, but I still hope it's 
clear what I mean.


Thanks again!!! 

-- 
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/5e0166a1-eebd-4e32-9ebd-6fda37980471%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Wikitext: using Transclusion as Link Target

2016-01-06 Thread Tobias Beer
Hi Jed,
 

> We would have to modify the macro a bit to add a close button to each tab 
> but I think that some sort of advanced tabs macro like that would get used 
> a lot. Something like the breadcrumbs Ton Gerner made (
> http://tw5breadcrumbs.tiddlyspot.com/), but with tabs.
>

All this sounds a lot like we're on our way to a TiddlersBar 
for TW5.

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/9c02df3b-d8a1-4f69-a8d3-a1f996c22fb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Wikitext: using Transclusion as Link Target

2016-01-06 Thread Tobias Beer
Hi Alex,
 

> But sometimes I want the currently active tiddler of this home tiddler 
> opened individually.
>

There are two things I am wondering now:

   1. If there is any way to define a custom template that contains a link
   from a tiddler in an internal toc to have it open in the main story 
   river.
   2. What needs to be done so we can have default (horizontal) tabs
   where clicking a link inside one opens the tiddler as a tab, if it is a 
   tab,
   similar to how the toc keeps things "internal".

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/ad4a5d28-c8cc-498e-b185-119d0c52d789%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Wikitext: using Transclusion as Link Target

2016-01-06 Thread Eric Shulman
On Wednesday, January 6, 2016 at 12:22:25 PM UTC-8, Tobias Beer wrote:
>
> Hi Alex,
>  
>
>> But sometimes I want the currently active tiddler of this home tiddler 
>> opened individually.
>>
>
> There are two things I am wondering now:
>
>1. If there is any way to define a custom template that contains a link
>from a tiddler in an internal toc to have it open in the main story 
>river.
>2. What needs to be done so we can have default (horizontal) tabs
>where clicking a link inside one opens the tiddler as a tab, if it is 
>a tab,
>similar to how the toc keeps things "internal".
>
> The toc-tabbed-internal macro works by wrapping the tabs in a 
<$linkcatcher> widget that takes the link target and sets the 
selectedTiddler ($:/temp/toc/selectedTiddler).  This, in turn, triggers a 
refresh of the tab display area which transcludes the current 
selectedTiddler.

Perhaps there is a way for a link that is contained within a <$linkcatcher> 
to force it's way out; however, as far as I know, anything that produces a 
tm-navigate message will be caught.


-e

-- 
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/0e034185-f344-4223-816c-716f7be4cb11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Wikitext: using Transclusion as Link Target

2016-01-06 Thread Jed Carty
Tobias,

I am not sure what you mean by 1, but I really like the idea of 2. I think 
that it could be done without too much trouble if we allow either the link 
or link catcher widget to trigger action widgets, or if you make fake links 
with buttons. However you do it, the action-listops widget could add which 
ever link is click to a list field and the list could be used as the filter 
to define the tabs using a normal tabs macro.
We would have to modify the macro a bit to add a close button to each tab 
but I think that some sort of advanced tabs macro like that would get used 
a lot. Something like the breadcrumbs Ton Gerner made 
(http://tw5breadcrumbs.tiddlyspot.com/), but with tabs.

-- 
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/570a8328-ec4f-4491-91e9-53469d742486%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.