TiddlerListMacro question

53 views
Skip to first unread message

whatever

unread,
Feb 15, 2010, 5:43:41 AM2/15/10
to TiddlyWiki
In one of my wikis I'm using the TiddlerListMacro (http://
jackparke.googlepages.com/jtw.html#TiddlerListMacro) to display the
titles of the content tiddlers. The problem is, the content tiddlers
are named with consecutive chapter numbers like this:
1. First
1.1 First First
2. Second
...
10. Tenth
10.1 Tenth First

The macro then displays the list like this:
1. First
1.1 First First
10. Tenth
10.1 Tenth First
2. Second
...

Obviously this is not the desired ordered. Does anyone have any idea
how to change this?

w

PMario

unread,
Feb 15, 2010, 7:17:50 PM2/15/10
to TiddlyWiki
hi,
I think I have read somewhere at tiddlytools.com that eric sorts
"numbered" text in the right order. But I can't remember the name of
the plugin.

-m

whatever

unread,
Feb 16, 2010, 2:14:45 PM2/16/10
to TiddlyWiki
I looked, but I couldn't find anything.
w

PMario

unread,
Feb 16, 2010, 4:31:36 PM2/16/10
to TiddlyWiki
Hi
It was this: http://groups.google.com/group/tiddlywiki/msg/ab3e21c675885ed2?hl=en
article that I remembered. But it talks about numberd fields. I am
sorry, but I have no other idea at the moment q:(
-m

whatever

unread,
Feb 16, 2010, 4:59:08 PM2/16/10
to TiddlyWiki
Yeah, I checked that, but it didn't work.
w

Anthony Muscio

unread,
Feb 16, 2010, 8:16:00 PM2/16/10
to tiddl...@googlegroups.com
This is always a problem with computers in general.

The most common solution is to place leading zeros in the names, and it will sort correctly eg;
01. First
01.1 First First
02. Second

...
10. Tenth
10.1 Tenth First

I believe the special sort treatment of Erics would be in his FET (For Each Tiddler) plugin which is a much more involved version of tiddlerlist macro.

A really basic way to do this would be to have a single tiddler in which you manualy list the chapter tiddlers in the order in which they apear and call this the TOC (Table of contents) tiddler and refer to it where every you need to - a manual sort.

Another method I employed was when I wanted the following tiddlers to apear in this order
Gold
Silver
Bronze
Blue
Green

Was to add a sort field to each and give it a suitable value eg;
Gold 10
Silver 20
Bronze 30
Blue 40
Green 50

I used tens to allow future insertions. I then used FET with a sort on the field rather than the title to put the list in correct order. This also allows you to choose when you display the chapter numbers in lists etc... and your links (within one chapter) to another chapter by text name only means it remains valid regardless of the order in which you place them.

I really like the tiddlerlistmacro myself and use it allot, perhaps the order in the above solution can be specified as "sortfield" or you could use the evaluated field somehow.

Although this method is a little more to setup and maintain it may avert the problem of you inserting a new chapter at the beginning because you will not need to rename every subsequent chapter.


Hope this gives you something to work with.

Tony



TonyM

If you have not found an easy way to do it with TiddlyWiki, you have missed something.
www.tiddlywiki.com



--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To post to this group, send email to tiddl...@googlegroups.com.
To unsubscribe from this group, send email to tiddlywiki+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.


Alex Hough

unread,
Feb 17, 2010, 3:30:19 PM2/17/10
to tiddl...@googlegroups.com
Cool idea
Was to add a sort field to each and give it a suitable value eg;
Gold 10
Silver 20
Bronze 30
Blue 40
Green 50

I'd not thought of using a custom field for indexing myself.
thanks
Alex


 



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

whatever

unread,
Feb 18, 2010, 3:52:38 AM2/18/10
to TiddlyWiki
Then there's also the alphabetical sorting, which puts lower cases
after all the upper cases, for example:
Henry
James
door
house

instead of:
door
Henry
house
James

w

> >> "TiddlyWiki" group.>> To post to this group, send email totidd...@googlegroups.com.
> >> To unsubscribe from this group, send email to>>tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsu...@googlegroups.com>


> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/tiddlywiki?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups

> > "TiddlyWiki" group.> To post to this group, send email totidd...@googlegroups.com.
> > To unsubscribe from this group, send email to>tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsu...@googlegroups.com>


> > .
> > For more options, visit this group at
> >http://groups.google.com/group/tiddlywiki?hl=en.
>

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

Mike

unread,
Feb 19, 2010, 10:06:25 AM2/19/10
to TiddlyWiki
for the alphabetical sorting see:
http://groups.google.com/group/tiddlywiki/browse_thread/thread/6c09be42f06e29bb/345a3a8ad087c9ce#345a3a8ad087c9ce

Demonstration here:
http://www.strm.us/tw/examples_twgg/hijack_alphabetization


Mike
P.S. The code is not mine, just packaged as a systemConfig / hijack
and tested.

whatever

unread,
Feb 19, 2010, 12:13:20 PM2/19/10
to TiddlyWiki
Hey!
I tried, but it doesn't work. What it does, however, is mess with the
timeline, which is then sorted from the oldest instead of the last
tiddler. This same behavior is also visible on your example page,
because without the plugin active, the tiddlers are listed like this:
* 19 February 2010
* HiJack_Alphabetization

* 10 February 2010
* Explanation
* SiteSubtitle
* SiteTitle
* Thuringia
* Zenda
* dragon
* manticore
* vampire
* Albion
* Cimmeria
* werewolf
* DefaultTiddlers

But with the plugin active, they're listed like this:
* 10 February 2010
* Explanation
* SiteSubtitle
* SiteTitle
* vampire
* manticore
* dragon
* Zenda
* Thuringia
* werewolf
* Cimmeria
* Albion
* DefaultTiddlers

* 19 February 2010
* HiJack_Alphabetization

w

On Feb 19, 4:06 pm, Mike <eris...@gmail.com> wrote:
> for the alphabetical sorting see:http://groups.google.com/group/tiddlywiki/browse_thread/thread/6c09be...

> > > >> You received this message because you are subscribed to the Google Groups> > >> "TiddlyWiki" group.>> To post to this group, send emailtot...@googlegroups.com.> > >> To unsubscribe from this group, send email to>>tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsu...@googlegroups.com>


> > > >> .
> > > >> For more options, visit this group at
> > > >>http://groups.google.com/group/tiddlywiki?hl=en.
>
> > > >  --

> > > > You received this message because you are subscribed to the Google Groups> > > "TiddlyWiki" group.> To post to this group, send emailtot...@googlegroups.com.> > > To unsubscribe from this group, send email to>tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsu...@googlegroups.com>

Mike

unread,
Feb 19, 2010, 1:08:27 PM2/19/10
to TiddlyWiki
ouch - didn't look at the timeline, maybe someone can find a solution
that fixes both, looks like this one is about 50% fixed list & all
tiddlers. . . Might need 2 start a new thread :(

mike

> > > > >> You received this message because you are subscribed to the Google Groups> > >> "TiddlyWiki" group.>> To post to this group, send emailtot...@googlegroups.com.> > >> To unsubscribe from this group, send email to>>tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsubscribe@google groups.com>


> > > > >> .
> > > > >> For more options, visit this group at
> > > > >>http://groups.google.com/group/tiddlywiki?hl=en.
>
> > > > >  --

> > > > > You received this message because you are subscribed to the Google Groups> > > "TiddlyWiki" group.> To post to this group, send emailtot...@googlegroups.com.> > > To unsubscribe from this group, send email to>tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsubscribe@googleg roups.com>

PMario

unread,
Feb 19, 2010, 3:25:02 PM2/19/10
to TiddlyWiki
Hi,
I am on the way, but not finished. I extended the core list macro with
2 new commands. <<list noCase>> and <<list numberedText>>. But now
writing the documentation, heavy brainstorming started ....

regards Mario

whatever

unread,
Feb 20, 2010, 6:09:00 PM2/20/10
to TiddlyWiki
While perusing the helpful http://twhelp.tiddlyspot.com I came across
the following piece of Saq's code:

<<forEachTiddler where 'tiddler.title.toLowerCase().startsWith("a")'
sortBy '(tiddler.title.toLowerCase())' ascending write '"|"+(index
+1)+"|[["+tiddler.title+"]] |@@color:#c06;&raquo; &raquo;@@
|"+tiddler.tags+"|\n"'>>

The above codes is just for letter A, but if you
remove .startsWith("a"), it displays all tiddlers.

I tested it and it sorts the tiddlers alphabetically, like I wanted
(A, b, C...), regardless of case, but I'm not sure how to add it to
the code, so that it would always sort that way. Also, I'm not sure
how to limit the display to only tiddlers tagged with a specific tag.

w

> > > > > >> --> > > > >> You received this message because you are subscribed to the Google Groups> > >> "TiddlyWiki" group.>> To post to this group, sendemailt...@googlegroups.com.> > >> To unsubscribe from this group, send email to>>tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsu...@googlegroups.com>


> > > > > >> .
> > > > > >> For more options, visit this group at
> > > > > >>http://groups.google.com/group/tiddlywiki?hl=en.
>

> > > > > >  --> > > > > You received this message because you are subscribed to the Google Groups> > > "TiddlyWiki" group.> To post to this group, sendemailt...@googlegroups.com.> > > To unsubscribe from this group, send email to>tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsu...@googlegroups.com>

PMario

unread,
Feb 21, 2010, 9:27:54 AM2/21/10
to TiddlyWiki
Hi,

As I said, two plugins [1], which extend the core list plugin. They
don't change anything from the core. They only add the functions.
<<list noCase>> alphanumeric list, not case sensitive. <<list
numberedText>> sorts tiddlers, that start with numberes. There are
some parameters, to adjust the behaviour. All parameters are optional.
If you want to have the 3rd parameter set, the second is also needed!
See the description. I needed the noCase parameter, thats why this
one, does what I need. The numberedText is there because I think it is
a nice to have :)

Also try the different themes and let me know, what you think.

Multi column mode:
To use multi column lists I use emastic. If you want to use it, with
low overhead, there is MaloStyleSheet, which should do the work also.

To show the possibilities, there are some examples. [2], [3], [4] in
the top row. To see the top row swich the themes.


ToDo:
*Have a closer look at the [tag[xx]] processor. Maybe I can make
everything compatible to matchtags plugin, without adding to much
code.
*This means, that the paremeters, and the order may change in future
versions

have fun
Mario Pietsch

[1]: http://apm-plugins.tiddlyspot.com/
[2] http://apm-plugins.tiddlyspot.com/#TiddlerMapTabs
[3] http://apm-plugins.tiddlyspot.com/#TiddlerMapTabsAZ
[4] http://apm-plugins.tiddlyspot.com/#TiddlerMap

On Feb 19, 9:25 pm, PMario <pmari...@gmail.com> wrote:

whatever

unread,
Feb 21, 2010, 10:05:35 AM2/21/10
to TiddlyWiki
Hey!
Love the plugins. However, can you limit which tiddlers they show? For
example, only tiddlers tagged with a certain tag. Also, can these
submacros be adapted for the tiddlerList macro (http://
jackparke.googlepages.com/jtw.html#TiddlerListMacro)?

w

> > > > > > >> --> > > > > >> You received this message because you are subscribed to the Google Groups> > >> "TiddlyWiki" group.>> To post to this group, sendemailt...@googlegroups.com.> > >> To unsubscribe from this group, send email to>>tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsu...@googlegroups.com>


> > > > > > >> .
> > > > > > >> For more options, visit this group at
> > > > > > >>http://groups.google.com/group/tiddlywiki?hl=en.
>

> > > > > > >  --> > > > > > You received this message because you are subscribed to the Google Groups> > > "TiddlyWiki" group.> To post to this group, sendemailt...@googlegroups.com.> > > To unsubscribe from this group, send email to>tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsu...@googlegroups.com>

PMario

unread,
Feb 21, 2010, 11:37:18 AM2/21/10
to TiddlyWiki
Hi,
As I wrote. noCase has no filter yet and numberedText can use tags.
-m
Reply all
Reply to author
Forward
0 new messages