Links from and to within same tiddler

1,334 views
Skip to first unread message

Mat

unread,
Apr 18, 2015, 10:47:03 AM4/18/15
to tiddl...@googlegroups.com
Putting the following as tiddler content works, i.e it shows the "click here" as a link which, when clicked, jumps down to "target".

<a href=#foo>click here</a>

[insert some longer text so to make the jumping visible]

<a id="foo">target</a>
Jump achieved!

...but, immediately after the jump, the page scrolls up to a tiddler "foo" (i.e just like when you click a tiddler link).

(BTW, is <a id="..."> the same thing as <a name="...">  ?)

How can I prevent/disable this jump to tiddler "foo"?

Or preferably, is there more appropriate wikitext markup instead of html?

Thank you!

<:-)

Jeremy Ruston

unread,
Apr 18, 2015, 12:04:42 PM4/18/15
to TiddlyWiki
Hi Mat

How can I prevent/disable this jump to tiddler "foo"?

The navigation is caused by changing the location hash portion of the URL. It raises an event which TiddlyWiki catches and then navigates to the tiddler specified in the location hash. It's not currently possible to disable that behaviour (doing so would disable permalinks/permaviews).

Or preferably, is there more appropriate wikitext markup instead of html?

I don't think that the approach you are trying can be made to work properly alongside the existing permalink handling. There are other potential problems, too: it's hard to make an anchor ID unique if it is transcluded into more than one part of the display.

One approach to adding intra-tiddler links would be to extend the existing TW navigation mechanism so that an anchor can be specified as well as the target tiddler. Then, rather than using HTML anchor tags and IDs to mark them, one would search through the tiddler widget tree to find the target. Thinking it through a little, the knock-on effects would be pretty horrendous.

But as you know from earlier discussions, I'm not keen on diving deep on "intra-tiddler" features. The alternative way to achieve a similar objective is to restyle the tiddler story river so that tiddlers look more like slices, without a visible title. Then stack those tiddler slices up to make "compound" tiddlers, which would be topped and tailed with formatting to make it look like a tiddler. So, what might look like 3 conventional tiddlers on the screen might actually be a sequence of 14 tiddlers (all individually accessible via their title).

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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8901d175-3fe2-405f-b47d-af5cefdab87e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Ed

unread,
Apr 20, 2015, 10:33:05 AM4/20/15
to tiddl...@googlegroups.com, jeremy...@gmail.com
Hi Jeremy,

Hope you don't find me lazy, but could you point me to a very good example
of this multi-tiddler-stack-impersonating-one-tiddler stuff.

Thanks in advance!
Salut! Edm.

Jeremy Ruston

unread,
Apr 21, 2015, 10:04:05 AM4/21/15
to Ed, TiddlyWiki
Hi Ed

Hope you don't find me lazy, but could you point me to a very good example
of this multi-tiddler-stack-impersonating-one-tiddler stuff.

I don't think that there is an existing example. Let me try to explain it this way: the original question is equivalent to introducing a new addressable unit that is smaller than a tiddler. The problem is that that mechanism ends up closely resembling the existing mechanism that we have for handling tiddlers, the existing addressable unit.

The suggestion is to restyle the display so that individual tiddlers display as contiguous paragraphs. Tiddlers that start a new section might be formatted to include a heading.

It's just a way to think about the problem that avoids cutting across the features that lie at the heart of TiddlyWiki. By thinking of splitting tiddlers you need to invent brand new mechanisms. But talking of joining tiddlers in sequence is straightforward with existing TiddlyWiki features.

Best wishes

Jeremy.


 

Thanks in advance!
Salut! Edm.


But as you know from earlier discussions, I'm not keen on diving deep on "intra-tiddler" features. The alternative way to achieve a similar objective is to restyle the tiddler story river so that tiddlers look more like slices, without a visible title. Then stack those tiddler slices up to make "compound" tiddlers, which would be topped and tailed with formatting to make it look like a tiddler. So, what might look like 3 conventional tiddlers on the screen might actually be a sequence of 14 tiddlers (all individually accessible via their title).

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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8901d175-3fe2-405f-b47d-af5cefdab87e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Mat

unread,
Apr 22, 2015, 12:17:10 PM4/22/15
to tiddl...@googlegroups.com, jeremy...@gmail.com

@Jeremy - thank you for your reply.

Ok, I had not quite understood this was the same as the issue with sections/slices. I particularly got excited from noting that adding a link as described (a href + a id) does succeed in jumping.

But, ok, it's the frequently recurring section/slices issue. We need to solve this as there clearly is a need for it. I like your joining idea and have thought a bit on how it might be interfaced.

@anyone - a simple mockup:


I imagine it as a popup accessed  via the tiddler toolbar. For example one might want to "Append current tiddler to the one above and set current title as h2 heading".

I know terms  "above/below" sound funny but "preceeding/succeeding" is ambiguous because of different story views. Above/below is strictly about location whereas terms preceeding/succeeding has an element of time in them. (...um, did someone just shout neeeerd?)

<titles list> is a search field. Maybe this is not possible inside a dropdown and it must really be two widgets?


Ideally there is also a global merge/compound feature from e.g the document toolbar, allowing you to select e.g "all open tiddlers" or filter. 

Obviously, if the tiddler head is hidden one also has to solve how to dis-compound without that tiddlers toolbar visible. One idea could be an check-box list in the top tiddlers head, aggregating the compounded titles. It would probably have much in common with a Table of Contents for multiple compound tiddlers anyway so I'd think it's a reusable thing....


@Jeremy

I've found the current lack for procedure to include sections has the exact opposite effect on my work from what I must assume is the purpose, i.e that of reusing tiddlers to avoid redundancy. Currently, I'm instead forced to copy sections of interest from other tiddlers. I thought about why this happens and realize that the whole concept of a tiddler is ambiguous because, as it turns out, what is a "smallest semantically meaningful chunk" depends on context! For example, the sentence "To be or not to be, that is the question" is an integral part in its original context, but as a quote it has a totally different context and must typically be cut out.

An area of particular concern for this issue is the coming Federation! As far as I understand, one primary idea there is to be able to re-use content. A different context from the original will likely be the norm ( - little point in mere repetition) so tools to slice out stuff will be much needed... and, ideally, slices smaller than an actual tiddler.

Here follow some pie-in-the-sky ideas on approaches for including sections in a Federated context, mostly to provoke thoughts on what needs we will actually have when we Federate so we don't lock ourselves in by choosing limited implementation strategies at an early stage:

Ok, one idea might be to remotely transclude (or whatever the technique is for inclusion) the whole tiddler and then to locally hide parts of it.

Another idea might be to, pre-inclusion, introduce "counting" to specify desired parts to include (...perhaps taking advantage of the nodejs row counting feature somehow?)  tiddler#r3:8@wiki or "p" for paragraphs, etc. If this is not possible pre-inclusion, then maybe this is how "hiding parts in imported local tiddlers", as per previous suggestion, could be achieved.

A probably better idea would be some kind of anchors that are automatically inserted, in the transclusion process, from various triggers, such as "paragraph start", macro calls, etc. Maybe that same kind of anchor could also be manually inserted.

<:-)

Jeremy Ruston

unread,
Apr 24, 2015, 4:54:49 AM4/24/15
to Mat, TiddlyWiki
Hi Mat

I think we're recursing in circles. Your trying to make the case for a unit of content that is smaller than a tiddler. I'm responding with the suggestion that we instead introduce a new concept of a "document" (say) that is a sequence of tiddlers and is displayed analogously to a tiddler today. A document would, of course, itself be implemented as a tiddler that references it's constituent tiddlers.

I believe that these two models are equivalent. The difference is that aggregating tiddlers goes with the grain of how TiddlyWiki is designed while splitting tiddlers into smaller entities requires TiddlyWiki to be re-architected.

Best wishes

Jeremy.


David Gifford

unread,
Apr 24, 2015, 1:17:24 PM4/24/15
to tiddl...@googlegroups.com
I have to agree with Jeremy. Tiddlywiki is different than Wikipedia. Wikipedia uses links to jump to places in an article precisely because it isnt as easy in Wikipedia to create small chunks as it is in TiddlyWiki. So in TiddlyWiki, one should just create TOC tiddler with links to chunks, or a story tiddler composed of those chunks.

Jed Carty

unread,
Apr 24, 2015, 2:32:37 PM4/24/15
to tiddl...@googlegroups.com
This seems like exactly what substories would do, but I have had absolutely no success figuring out how either the story list of history list actually works. I have been looking at this because the way that the list field of the story list is manipulated could be very useful in other contexts.

In the creating substories tiddler on tiddlywiki.com it seems like you should be able to put in a button that sends the tm-navigate message to take you to a tiddler in that substory the same way you could for a tiddler in the main story river. This doesn't work, but I haven't been able to find anywhere to figure out how the story and history lists work (also the link catcher widget, I have no idea what that does). Is there anywhere I could look to see how the story and history lists work before I start poking the code?

Jeremy Ruston

unread,
May 4, 2015, 4:39:04 PM5/4/15
to TiddlyWiki
Hi Jed

This seems like exactly what substories would do, but I have had absolutely no success figuring out how either the story list of history list actually works. I have been looking at this because the way that the list field of the story list is manipulated could be very useful in other contexts.

This might be a good topic for a hangout; I'll add it to my list for hangout #86.
 
In the creating substories tiddler on tiddlywiki.com it seems like you should be able to put in a button that sends the tm-navigate message to take you to a tiddler in that substory the same way you could for a tiddler in the main story river. This doesn't work, but I haven't been able to find anywhere to figure out how the story and history lists work (also the link catcher widget, I have no idea what that does). Is there anywhere I could look to see how the story and history lists work before I start poking the code?

You just need to wrap the substory in a navigator widget that references the same storylist and history list as the substory. 


If you want to have a button outside the substory that navigates to a tiddler within the substory then you should wrap the button in a navigator widget with the same attributes.

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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages