ListNavMacro

16 views
Skip to first unread message

wolfgang

unread,
Sep 13, 2009, 7:43:57 PM9/13/09
to TiddlyWiki
Hi Fred,

looked at your ListNavMacro you wrote back in March:

http://fnd.lewcid.org/tmp/ListNavMacro.html

..which would be really useful if the list items could actually be
used for opening tiddlers, especially for TiddlyWikis with many.
However, installing brought an instant slowing of performance, which
could be caused because the 'All' listing is always rendered at first.
Or could it even be that all listings are rendered at once?

Do you still plan continue to work on it?

Regards..

Alex Hough

unread,
Sep 14, 2009, 2:27:25 AM9/14/09
to tiddl...@googlegroups.com
I find it useful too - i'm using it for listing bibliographies pasted from Word documents. The items get wikified when they come into play.
It would be great if wikilinks would work in in the lists. Also, on 'all' I have two dots in front of each listed item.

'All' does slow things up. Perhaps the default could be in a folded position

Alex

2009/9/14 wolfgang <wolfga...@gmail.com>



--
http://www.multiurl.com/g/64

FND

unread,
Sep 14, 2009, 4:41:11 AM9/14/09
to tiddl...@googlegroups.com
> ..which would be really useful if the list items could actually be
> used for opening tiddlers, especially for TiddlyWikis with many.

Done:
http://trac.tiddlywiki.org/changeset/10631
http://fnd.lewcid.org/tmp/ListNavMacro.html

> However, installing brought an instant slowing of performance, which
> could be caused because the 'All' listing is always rendered at first.

All items have to be are rendered initially. The jQuery listnav plugin
just hides items dynamically (i.e. they remain present in the DOM).

> Also, on 'all' I have two dots in front of each listed item.

Not sure what you mean by that - got a test case?


-- F.

Alex Hough

unread,
Sep 14, 2009, 6:21:15 AM9/14/09
to tiddl...@googlegroups.com

wolfgang

unread,
Sep 14, 2009, 6:26:12 AM9/14/09
to TiddlyWiki
> > ..which would be really useful if the list items could actually be
> > used for opening tiddlers, especially for TiddlyWikis with many.
>
> Done:


Many thanks for that quick update!

Hate to be picky ;-) though: It only renders WikiWords but no double
braced titles as clickable links.
Tried to circumvent that by using a source tiddler with <<list filter
[tag[ContentTag]]>>. Which worked, but only lists the titles under ALL
while counting it as 1. Guess I could make a static list with forced
links out of this source tiddler. However, that probably still
wouldn't list the titles under their alphabetic letter, since then all
titles would start with [[...

Would be really good if forced links could be sorted without the
proceeding braces..

Regards..

FND

unread,
Sep 14, 2009, 6:37:52 AM9/14/09
to tiddl...@googlegroups.com
> Hate to be picky ;-) though: It only renders WikiWords but no double
> braced titles as clickable links.

Seems to work for me (tried it on Alex's document) - test case?

> Would be really good if forced links could be sorted without the
> proceeding braces..

The jQuery listnav plugin just takes whatever the list item's text is.
If wikification works, so should sorting.

> I've produced a test case

You have blank lines in your source listing, which are not ignored by
the plugin, thus creating empty list items (which leads to the
appearance of two bullet points).


-- F.

wolfgang

unread,
Sep 14, 2009, 7:39:34 AM9/14/09
to TiddlyWiki
> > Hate to be picky ;-) though: It only renders WikiWords but no double
> > braced titles as clickable links.
>
> Seems to work for me (tried it on Alex's document) - test case?
>
> > Would be really good if forced links could be sorted without the
> > proceeding braces..
>
> The jQuery listnav plugin just takes whatever the list item's text is.
> If wikification works, so should sorting.

Alright, the test case showed that my hypothesizing was wrong - in
that I thought it wouldn't recognize the listing due to double braces:

http://aid1.tiddlyspot.com/

Using an alternative <<list filter [tag[..]]>> - because the internal
filter only recognizes CamelCases - gave me the faulty result
reported. However, a static list of tiddler titles with double braces
does get filtered, and anyway is probably better for performance with
many more tags involved.

Thanks again.

FND

unread,
Sep 14, 2009, 8:44:53 AM9/14/09
to tiddl...@googlegroups.com
> Alright, the test case showed that my hypothesizing was wrong

That's the magic of test cases.

> http://aid1.tiddlyspot.com/

That's not a minimal test case, I'm afraid:
http://webkit.org/quality/reduction.html

> Using an alternative <<list filter [tag[..]]>> - because the internal
> filter only recognizes CamelCases

That sounds unlikely (though not impossible). I'm not quite following
you though...


-- F.

Alex Hough

unread,
Sep 14, 2009, 10:02:41 AM9/14/09
to tiddl...@googlegroups.com
FND,

I'm still confused why [1] isn't rendered as a link on my test case [2]

RE: You have blank lines in your source listing, which are not ignored by the plugin, thus creating empty list items (which leads to the appearance of two bullet points).

The empty list items are not produced under the tabs. Looking under 'A'  , Aaker [1] is rendered without the brackets, unlike under 'ALL' however it is not rendered as a link.


ALex


[1] [[Aaker, D.A. (1991) Managing brand equity: Capitalizing on the value of a brand name, NY: Free Press]]
[2] https://dl.getdropbox.com/u/1316865/TiddlyWikiTestCases/NavigationPlugin.html

2009/9/14 FND <FN...@gmx.net>



--
http://www.multiurl.com/g/64

FND

unread,
Sep 14, 2009, 10:25:55 AM9/14/09
to tiddl...@googlegroups.com
> I'm still confused why [1] isn't rendered as a link on my test case [2]

The wikification is optional, so you need to add wikified:true as macro
parameter. (Sorry, I kinda took that part for granted.)

> The empty list items are not produced under the tabs.

That's right, because they don't start with any letter.

> Looking under 'A' , Aaker [1] is rendered without the brackets, unlike under
> 'ALL' however it is not rendered as a link.

Actually, that particular entry is not rendered under "A" at all unless
wikified, because it starts with "[".
As explained to Wolfgang, the categorization and sorting are based on
what's being rendered, not on the raw wikitext.


-- F.

Alex Hough

unread,
Sep 14, 2009, 10:51:39 AM9/14/09
to tiddl...@googlegroups.com
The way I was aiming to use the listNav was in a long tiddler of references. When I use a reference I add double brackets and grant it a promotion by giving its own tiddler.

It appears that listNav is not the way to do this as the double brackets are read as double brackets.

Any suggestions for a way forward?

Alex

2009/9/14 FND <FN...@gmx.net>



--
http://www.multiurl.com/g/64

wolfgang

unread,
Sep 14, 2009, 11:59:17 AM9/14/09
to TiddlyWiki
>
> > >Seems to work for me (tried it on Alex's document) - test case?
>
> > Alright, the test case showed that my hypothesizing was wrong
>
> That's the magic of test cases.
>
> > http://aid1.tiddlyspot.com/
>
> That's not a minimal test case, I'm afraid:
>

You only asked: '- test case?' - Joking aside, ListNavMacro becomes
only useful to me if it can handle the filtering of a lot of tiddler
titles, as in my test case. If it could handle only a minimum, I would
prefer to use DividedListPlugin, ForEachTiddlerPlugin or some such..
with which one could to the same sufficiently well with a few
tiddlers.

> > Using an alternative <<list filter [tag[..]]>> - because the internal
> > filter only recognizes CamelCases
>
> That sounds unlikely (though not impossible). I'm not quite following
> you though...
>

Take a look at the appearing tab: 'by tag filter' ..and compare it to
the examples under tab: 'by source tiddler' and 'by external filter'
to see the differences.

> It appears that listNav is not the way to do this as the double brackets are
> read as double brackets.
>
> Any suggestions for a way forward?

Guess I don't understand correctly, but wouldn't the 'wikified:true'
parameter correct this?

Otherwise ForEachTiddlerPlugin could do it as well.

Regards..

mck

unread,
Sep 14, 2009, 8:20:38 PM9/14/09
to TiddlyWiki

Could the jQuery ListMenu Plugin be used to achieved the desired
result?

http://www.ihwy.com/Labs/jquery-listmenu-plugin.aspx

It appears that it has features that are lacking from the
ListNavMacro including that "list items could actually be
used for opening tiddlers".

Could this jQuery ListMenu Plugin easily be converted into a
TiddlyWiki plugin?

I currently have a tiddlywiki of over 1300 thesis titles and so am
looking for a more elegant way to create the tabbed a-z list:
http://pgilib.googlepages.com/theses.html

mck

wolfgang

unread,
Sep 14, 2009, 8:57:16 PM9/14/09
to TiddlyWiki
> Could the jQuery ListMenu Plugin be used to achieved the desired
> result?
>
> http://www.ihwy.com/Labs/jquery-listmenu-plugin.aspx
>

Hi mck,

with ListNavPlugin I only got it to do this with a static list of
force linked tiddler links:
http://aid1.tiddlyspot.com/

But maybe some other plugin is interfering in my case, and it's always
worth trying with different conditions.

> I currently have a tiddlywiki of over 1300 thesis titles and so am
> looking for a more elegant way to create the tabbed a-z list:http://pgilib.googlepages.com/theses.html
>

Very impressive example of ForEachTiddler scripts - really well done!

I never seen tabs constructed the way you did:

<tabs mytabs>
<tab A>
<<forEachTiddler
where
'tiddler.title.replace(/^(A|An|The) /,"").substr(0,1).toUpperCase
()=="A" && tiddler.tags.contains("cp")'
sortBy
'tiddler.title.replace(/^(A|An|The) /,"").toUpperCase()'>>
</tab>
<tab B>
<<forEachTiddler
where
...
</tab>
<tab Z>
<<forEachTiddler
where
'tiddler.title.replace(/^(A|An|The) /,"").substr(0,1).toUpperCase
()=="Z" && tiddler.tags.contains("cp")'
sortBy
'tiddler.title.replace(/^(A|An|The) /,"").toUpperCase()'>>
</tab>
</tabs>

...hmm, looks more like html than TiddlyWiki's own tab syntax to me..?

And with tiddler transclusion it could still be shortened a bid.

Thanks for sharing.

Eric Shulman

unread,
Sep 14, 2009, 9:29:50 PM9/14/09
to TiddlyWiki
> Very impressive example of ForEachTiddler scripts - really well done!
>
> I never seen tabs constructed the way you did:

He's using Saq's InlineTabsPlugin (sorry, no URL)...

> <tabs mytabs>
> <tab A>
> <<forEachTiddler
> where
>       'tiddler.title.replace(/^(A|An|The) /,"").substr(0,1).toUpperCase
> ()=="A" && tiddler.tags.contains("cp")'
>    sortBy
>  'tiddler.title.replace(/^(A|An|The) /,"").toUpperCase()'>>
> </tab>
> <tab B>
...
> </tab>
> <tab Z>
...
> </tab>
> </tabs>
>
> ...hmm, looks more like html than TiddlyWiki's own tab syntax to me..?
> And with tiddler transclusion it could still be shortened a bid.

You can do 'inline tabs' using only TW-native syntax, all in one
tiddler without any plugins or scripts.

Using the [[by Title]] tiddler as an example, it could be rewritten by
putting the <<forEach>> macro and the tab definitions into 'hidden
sections' that are then referenced by the core's <<tabs>> macro, like
this:
--------------------------------
/%
!list
<<forEachTiddler
where 'tiddler.title.replace(/^(A|An|The) /,"").substr
(0,1).toUpperCase()=="$1" && tiddler.tags.contains("cp")'
sortBy 'tiddler.title.replace(/^(A|An|The) /,"").toUpperCase()'>>
!A
<<tiddler [[by Title##list]] with: A>>
!B
<<tiddler [[by Title##list]] with: B>>
!C
...
!Z
<<tiddler [[by Title##list]] with: Z>>
%/
<<tabs txtByTitleTab
A A [[by Title##A]]
B B [[by Title##B]]
...
Z Z [[by Title##Z]]>>
--------------------------------

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

wolfgang

unread,
Sep 15, 2009, 3:17:12 PM9/15/09
to TiddlyWiki
> > Could the jQuery ListMenu Plugin be used to achieved the desired
> > result?
>
> > I currently have a tiddlywiki of over 1300 thesis titles and so am
> > looking for a more elegant way to create the tabbed a-z list:http://pgilib.googlepages.com/theses.html
>

Just tested ListNavMacro, filtering a static list, side by side with
ForEachTiddler tabs filtering dynamically by tag some 600 titles out
of 1400. Here ListNav can't compare to the fastness in processing by
ForEach...

> > I never seen tabs constructed the way you did:
>
> He's using Saq's InlineTabsPlugin (sorry, no URL)...
>

That's it:
http://tw.lewcid.org/svn/plugins/InlineTabsPlugin/

> You can do 'inline tabs' using only TW-native syntax, all in one
> tiddler without any plugins or scripts.
>
> Using the [[by Title]] tiddler as an example, it could be rewritten by
> putting the <<forEach>> macro and the tab definitions into 'hidden
> sections' that are then referenced by the core's <<tabs>> macro, like
> this:
>

.. thanks for the example.

what I still don't understand - despite much trial - is, how such a
[[by Title]] tiddler could repeatedly be used by transclusion for
different tags?

mck

unread,
Sep 15, 2009, 6:37:17 PM9/15/09
to TiddlyWiki
Hi Eric,

Thanks for the suggestions for the using core's the <<tabs>> macro and
for the Javascript code.

I'm trying to get this to work but am getting an odd self-recursive
looping effect especially when I get to the Z's.

Any idea on what could be causing this?

mck

mck

unread,
Sep 15, 2009, 9:43:52 PM9/15/09
to TiddlyWiki
Hi Eric,

Forget my last request as I was able to figure this out.

The missing !end made the difference and now it works like a charm:

--------------------------------
/%
!list
<<forEachTiddler
where 'tiddler.title.replace(/^(A|An|The) /,"").substr
(0,1).toUpperCase()=="$1" && tiddler.tags.contains("cp")'
sortBy 'tiddler.title.replace(/^(A|An|The) /,"").toUpperCase()'>>
!A
<<tiddler [[by Title##list]] with: A>>
!B
<<tiddler [[by Title##list]] with: B>>
!C
...
!Z
<<tiddler [[by Title##list]] with: Z>>
!end
%/
<<tabs txtByTitleTab
A A [[by Title##A]]
B B [[by Title##B]]
...
Z Z [[by Title##Z]]>>
--------------------------------


Reply all
Reply to author
Forward
0 new messages