CoreTweaks for TW 2.4.3 and section jumps

6 views
Skip to first unread message

Dave Parker

unread,
Feb 22, 2009, 10:54:34 PM2/22/09
to TiddlyWiki
Hi Eric,

when you have a minute would you mind helping me get this working
please?

I put the above mentioned CoreTweaks in my TW and when I try a
[[tiddler##section]] link, the browser tries to find a local file
called "tiddler##section" instead of going to the tiddler and
autoscrolling.

This sounds familiar but I couldn't find it in a search here.

Thanks,
Dave Parker

Eric Shulman

unread,
Feb 22, 2009, 11:51:51 PM2/22/09
to TiddlyWiki
> I put the above mentioned CoreTweaks in my TW and when I try a
> [[tiddler##section]] link, the browser tries to find a local file
> called "tiddler##section" instead of going to the tiddler and
> autoscrolling.

As of 6-Jan-2009, the core tweak for section links was moved to a
stand-alone plugin:

http://www.TiddlyTools.com/#SectionLinksPlugin

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

cedardoc

unread,
Feb 23, 2009, 9:12:26 AM2/23/09
to TiddlyWiki
Thank you, Eric

When I try to use it here:
http://worldenglishbible.tiddlyspot.com/#%5B%5BMat%2024%3A34%5D%5D
(click on "goto context")

it just pops to the top of the page (in firefox - in IE7 it goes to
the tiddler but doesn't scroll)

Am I doing something wrong or are there clashing plugins?
Thanks again,
Dave

Eric Shulman

unread,
Feb 23, 2009, 1:11:29 PM2/23/09
to TiddlyWiki
> When I try to use it here:http://worldenglishbible.tiddlyspot.com/#%5B%5BMat%2024%3A34%5D%5D
> (click on "goto context")
>
> it just pops to the top of the page (in firefox -  in IE7 it goes to
> the tiddler but doesn't scroll)
>
> Am I doing something wrong or are there clashing plugins?

There are two problems that are preventing SectionLinksPlugin from
working with your current document content:

The first problem concerns use of the following CSS in your
[[StyleSheet]]:
h1 { display:none; }

I recall that I had suggested this particular trick a little while ago
as a way to hide the headings so that only the content in the tiddler
is visible, while still being able to use the headings to define the
'tiddler sections'.

Unfortunately, although this technique works when using the sections
to transclude content into other tiddlers (e.g., <<tiddler
TiddlerName::sectionName>>), SectionLinksPlugin can only scroll to a
section heading if it is actually *displayed* in the document... and
using "display:none" prevents that from working properly because a
hidden heading element apparently has a default rendered location on
the page of (0,0).

Fortunately, there is another way to use CSS that will render the
heading elements at their proper 'inline' locations while also
preventing them from having a *visible* effect on the section content
that follows them:
h1 { display:inline; visibility:hidden; border:0; padding:0; margin:
0; font-size:0; line-height:0; }

The second problem that is interfering with your use section links
relates to how you have formatted the 'target' tiddler: because it is
very long, you have used a custom CSS wrapper, {{sc{...}}}, to enclose
the tiddler's content within a fixed-height, scrolling DIV, where
".sc" is defined in the [[StyleSheet]] as:
.sc { height:225px; ... overflow:auto; ... }

However, SectionLinksPlugin works by scrolling the whole *page* using
the standard window.scrollTo() function, and does not have the ability
to identify and scroll to a position within specific custom-defined
scrollable DIV that has been rendered within some tiddler.

If you want SectionLinksPlugin to work with this particular content
then, in addition to using the alternative "h1" definition I've
described above, you'll also have to remove the {{sc{...}}} wrapper
from the target tiddler (or just set the CSS for .sc to
{ height:auto; }),

cedardoc

unread,
Feb 23, 2009, 1:33:18 PM2/23/09
to TiddlyWiki
Thanks Eric - that did the trick, and as an extra bonus, my pop up
nested sliders work again now! (they didn't before when I was using
the tiddler scroll thing)

A related question: Is there any way to have the jump-to-section thing
work so that the jumped-to section is highlighted like when you do a
firefox search?


gratefully yours,
Dave
Reply all
Reply to author
Forward
0 new messages