List tiddler links in drop down boxes or as a list of letters

287 views
Skip to first unread message

parker_130

unread,
May 8, 2012, 3:53:19 AM5/8/12
to TiddlyWiki
Hi All,

I'm a massive N00b at tiddlyWiki and I am having a ball experimenting
with all the plugings.

I have a text list of about 500 words which will be links to other
tiddlers.

What I am after is an easy way to display this.

I was thinking a drop down list for each letter (a-z) or even a list
of letters (a-z) which when clicked displays the sub list.

For example if I clicked on B below would be shown

A B C D E F G.......
Bacon
Beans
Ball
Bin

I've had a look at the drop down lists but can't find a simple
example.

Any pointers would be much appreciated.

Cheers,

Parker

Alex Hough

unread,
May 8, 2012, 4:30:22 AM5/8/12
to tiddl...@googlegroups.com
Hi,

And Welcome.

Are you saying that you want the make a tiddler and a link for each
word in your list?

This might be a use case for Tobias Beer's autoweave?


Alex
> --
> 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.
>

Eric Shulman

unread,
May 8, 2012, 4:53:22 PM5/8/12
to TiddlyWiki
> I have a text list of about 500 words which will be links to other
> tiddlers.
> What I am after is an easy way to display this.
> I was thinking a drop down list for each letter (a-z) or even a list
> of letters (a-z) which when clicked displays the sub list.
> For example if I clicked on B below would be shown
> A B C D E F G.......
> Bacon
> Beans
> Ball
> Bin

For your purposes, start by putting the text list, sorted
alphabetically, into a single tiddler (e.g., [[WordList]], and then
add in single-letter "section headings" like this:

!A
About
All
Another
!B
Bacon
Beans
Ball
Bin
!C
...etc...
!D
...
!Z
Zebra
Zowie
Zymurgy

Note: since you want these words to all be links to tiddlers, you will
have to enclose each within doubled square brackets (e.g., [[Zowie]]),
otherwise they will appear a simple plain text (unless, of course,
they are written as WikiWords, which are automatically treated as
links).

Next, install this plugin:
http://www.tiddlytools.com/#ShowPopupPlugin
which will let you embed the following macro calls in any tiddler you
like:

<<showPopup tiddler:[[WordList##A]] label:"A">>
<<showPopup tiddler:[[WordList##B]] label:"B">>
<<showPopup tiddler:[[WordList##C]] label:"C">>
...
<<showPopup tiddler:[[WordList##X]] label:"X">>
<<showPopup tiddler:[[WordList##Y]] label:"Y">>
<<showPopup tiddler:[[WordList##Z]] label:"Z">>

If you put the macros onto one line (i.e, omit the newlines above),
you will get a single row of output that looks like:
A B C ... X Y Z
where clicking a letter shows a popup list with the contents of the
corresponding section of the [[WordList]].

QED.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

----
WAS THIS ANSWER HELPFUL? IF SO, PLEASE MAKE A DONATION
http://www.TiddlyTools.com/#Donations
note: donations are directly used to pay for food, rent,
gas, net connection, etc., so please give generously and often!

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact

TonG

unread,
May 9, 2012, 3:51:35 AM5/9/12
to TiddlyWiki
Another approach: just using TWCore's tab macro.
A tiddler containing:
<<tabs ""
"A " "" "A"
"B " "" "B"
"C " "" "C"
...
"Z" "" "Z"
>>
And tiddlers A to Z containing your lists, e.g "B" containing:
Bacon
Beans
Ball
Bin

Cheers,

Ton

Tobias Beer

unread,
May 10, 2012, 9:24:37 AM5/10/12
to tiddl...@googlegroups.com
Check out Marios Plugin...

http://apm-plugins.tiddlyspot.com/#TiddlerMapTabsAZ

Cheers, Tobias.

PMario

unread,
May 10, 2012, 1:24:28 PM5/10/12
to TiddlyWiki
Hi Parker,
As Tobias mentioned my plugins spot, I think a little bit additional
info will be needed. IMO the whole stuff may be quite tricky, for a
beginner. So if this is, what you want, you may need some more help to
get it going.

The basic idea was to create a TiddlerMap [1]. After adding some more
<<tiddler ...>> transclusions it turned out TiddlerMapsTabs [2] is
usefull.

All the rest is just variations of the same mechanism - tiddler
transclusions [7].

The whole "logic" is stored in the TiddlerMap[1] tiddler. If you have
a look at the tiddler source code, you'll see it at the end of the
tiddler. There is some hidden stuff [8] covered with /% .. %/ ...

To get the multi column display, you'll need to activate the
MaloStyleSheet [4]. There is also an "A-Z" tab [5] in the right
SideBarTabs [6] that may be of interest.

If you have trouble, just post!

have fun!
-mario

[1] http://apm-plugins.tiddlyspot.com/#TiddlerMap
[2] http://apm-plugins.tiddlyspot.com/#TiddlerMapTabs
[3] http://apm-plugins.tiddlyspot.com/#NoCaseListPlugin
[4] http://apm-plugins.tiddlyspot.com/#MaloStyleSheet
[5] http://apm-plugins.tiddlyspot.com/#TiddlerMapSlider
[6] http://apm-plugins.tiddlyspot.com/#SideBarTabs

[7] http://tiddlywiki.org/#Transclusion
[8] http://tiddlywiki.org/#[[Basic%20Formatting]]

Tobias Beer

unread,
May 10, 2012, 6:35:56 PM5/10/12
to tiddl...@googlegroups.com
Hi Parker,

To make it simpler for you and everyone else, here's the all new TiddlerTabsPlugin...

http://tiddlertabs.tiddlyspace.com

Please test and give feedback if it does what it's supposed to.

Cheers, Tobias.

Måns

unread,
May 11, 2012, 11:34:16 AM5/11/12
to TiddlyWiki
Hi Tobias

> ... here's the all new TiddlerTabsPlugin...
>
> http://tiddlertabs.tiddlyspace.com

GREAT GREAT GREAT :-D

Thanks a LOT for sharing this!!!!

Good job!!

Will you consider to make it possible to create templates for lists -
like the list macro does?

Something like:

<<tiddlerTabs group:5 sub:2 template:Templates##MyListTemplate>>

where MyListTemplate section could be variations on:

!MyListTemplate
<<view title link>>
<<view ##Example1 text>>
<<view ::Slice text>>
<<view "[img[%0::image][%0]]" wikified>>
!end

That would be really awesome :-)

Cheers Måns Mårtensson

Tobias Beer

unread,
May 13, 2012, 2:44:58 PM5/13/12
to tiddl...@googlegroups.com
Hi Mans,

This sounds very useful for all kinds of plugins rendering lists. However, I am not familiar with building this templating into a plugin.

Would someone a little bit more core-literate be able to tell me if the critical part for doing this simply is to pass a tiddler reference to the wikify function as is done in the list macro like so...

wikify(template, li, null, tiddler);

?

I guess it would likewise make sense to also make use of the core's filter mechanism.

Does anyone know in detail what the list filter mechanism is capable of doing and whether there are enhanced filtering abilities in TiddlySpace?


Tobias.

PMario

unread,
May 13, 2012, 7:30:56 PM5/13/12
to TiddlyWiki
On May 13, 8:44 pm, Tobias Beer <beertob...@googlemail.com> wrote:
> Would someone a little bit more core-literate be able to tell me if the
> critical part for doing this simply is to pass a tiddler reference to the
> wikify function as is done in the list macro like so...
>
> wikify(template, li, null, tiddler);
In the case of <<list>> plugin ... yes
The default list macro template is: "<<view title link>>"
The <<view>> macro needs the tiddler context (object) to work with.

In the case of your plugin, imo it would be a bit trickier.
If I'm right, you create a shadow tiddler and wikify it afterwards. So
your template is the shadow tiddler, which is hardcoded atm.
Imo you'd need to resolve the "user template" within your shadow
tiddler creation.

> I guess it would likewise make sense to also make use of the core's filter
> mechanism.
If you do so, it would be wise to be MatchTagsPlugin compatible.
It extends the <<list filter [tag[]]>> mechanism to be able to use
AND, OR, NOT ... You may want to use it ... and ... You shouldn't
break it.

> Does anyone know in detail what the list filter mechanism is capable of
> doing and whether there are enhanced filtering abilities in TiddlySpace?
Default TiddlySpace expands it with the "is" public/private filter.
Open the source and search for "config.filters".
See the core Filters.js [2] and Macros.js files for more info.

If you have a look at my NoCaseListPlugin [1] you can see, how to
extend the list macro with your own "filter" eg: <<list noCase>>
which just addes a "noCase" extension.

hope that helps
-mario

[1] http://apm-plugins.tiddlyspot.com/#NoCaseListPlugin
[2] https://github.com/TiddlyWiki/tiddlywiki/blob/master/js/Filters.js

Tobias Beer

unread,
May 14, 2012, 5:19:44 AM5/14/12
to tiddl...@googlegroups.com
Hi Mario,

Thanks a lot for the details. I guess, I'll do three things then:

1) Allow to make use of the core filter macro as a parameter to the TiddlerTabsPlugin macro.
2) Remove shadow tiddler usage in favor of custom tabs implementation which only renders tiddler lists when the tab is actually clicked.
3) Use the core templating system when rendering each list ...thus allowing for a tidder lemplate to be used along with the tiddler object context.

Cheers, Tobias.

Måns

unread,
May 14, 2012, 10:30:39 AM5/14/12
to TiddlyWiki
Hi Tobias

> I guess, I'll do three things then:
>
> 1) Allow to make use of the core filter macro as a parameter to the
> TiddlerTabsPlugin macro.
> 2) Remove shadow tiddler usage in favor of custom tabs implementation which
> only renders tiddler lists when the tab is actually clicked.
> 3) Use the core templating system when rendering each list ...thus allowing
> for a tidder lemplate to be used along with the tiddler object context.

That would be really awesome - I'm looking forward to it...
Tabs & list is the combination I'm using ALL the time and the ability
to template lists is THE reason why I keep using
ForeachTiddlerPlugin...
Good luck with the project - imho it might be sth. to consider putting
into the core, being an important and very useful combination of the
list and tab macros...

Cheers Måns Mårtensson

Tobias Beer

unread,
May 14, 2012, 11:59:35 AM5/14/12
to tiddl...@googlegroups.com
Just to be clear, for now I do not intend to extend the core list > filter mechanism...
because that would mean to rewrite the whole plugin from scratch as the architecture would be completely different.

What this means is that there will be no <<list filter:blabla>> macro rendering the list inside a tab... far from it.
What I will do is...
  • to allow for using the filter param for all items in all tabs
  • for the list output to be templated equivalently
Currently I am not sure if the current core filters are actually as flexible as I like them to be, which is this:

Enhance to filter tiddlers via something like...

store.getTiddlersFiltered(
  {
    sort:'title',
    exclude:'tag1 tag2 tag3',
    tagged:'tag4 tag5 tag6',
    excludeSpace:'space2* space1_public',
    inSpace:'space1_private',
  }
)

...and then allow any of...
  • <<tiddlerTabs tagged:"[[tag A]] tagB 'tag C'" exclude:"systemConfig excludeLists">>
  • <<tiddlerTabs excludeSpaces:"system* *system *tiddlyspace" exclude:"excludeLists">>
  • <<tiddlerTabs spaces:"MyBooks*" tagged:"book">>

Cheers, Tobias.

Måns

unread,
May 14, 2012, 12:31:16 PM5/14/12
to TiddlyWiki
Hi Tobias

> Just to be clear, for now I do not intend to extend the core list > filter
> mechanism...
> because that would mean to rewrite the whole plugin from scratch as the
> architecture would be completely different.

Ok :-)

> What I will do is...
>
>    - to allow for using the filter param for *all items* in all tabs
>    - for the list output to be templated equivalently

Still sounds GREAT :-)

> Currently I am not sure if the current core filters are actually as
> flexible as I like them to be, which is this:
>
> Enhance to filter tiddlers via something like...
>
> store.getTiddlersFiltered(>   {
> >     sort:'title',    exclude:'tag1 tag2 tag3',    tagged:'tag4 tag5 tag6',    excludeSpace:'space2* space1_public',
> >     inSpace:'space1_private',
> >   }
> > )

Jon made some extentions to TiddlySpace with: ExtraFiltersPlugin,
NumberSortFilterPlugin and StoryFiltersPlugin which extends the filter
syntax

http://filters.tiddlyspace.com/#SiteInfo

Cheers Måns Mårtensson

Tobias Beer

unread,
May 14, 2012, 2:51:43 PM5/14/12
to tiddl...@googlegroups.com
Thanks Mans (and Jon),

those extra filters add a lot of extra spice to the core filter handling. Mans, you being among the most avid testers producing - ever new plugin mashups - would you know if they behave well / work nicely with MatchTagsPlugin?

Cheers, Tobias.

Tobias Beer

unread,
May 14, 2012, 3:16:48 PM5/14/12
to tiddl...@googlegroups.com
@Jon,

ExtraFiltersPlugin states that it requires TiddlySpaceFilters and ImageMacroPlugin. Is that really the case? Or is it rather that some functionality is only available if indeed those two are present?

Also, those filter rules do not seem to always combine. Looking at {has} and {startsWith} it seems that the result list is always created based on all tiddlers. Why is that? How about changing forEachTiddler, so that you can run it against a preexisting set of tiddlers, e.g.

this.forEachTiddler = function(callback, tids) {
var t, ts = tids || tiddlers;
for(t in ts) {
var tiddler = tiddlers[t];
if(tiddler instanceof Tiddler)
callback.call(this,t,tiddler);
}
};

I am just thinking that some of those additional filters are quite handy for non-ts use-cases. So, perhaps ...is it a viable option to split them into ExtraFiltersCode and ExtraFiltersTS?

Cheers, Tobias.

PMario

unread,
May 14, 2012, 3:28:17 PM5/14/12
to TiddlyWiki
I didn't test them with MatchTagsPlugin

====

The plugins are labeled "experimental". IMO they work great, as a
proof of concept to talk about and play with. It is a base to develop
an extended filter syntax. ....

I'm not very happy with the "additional syntax". IMO it is not
consistent.
eg:

>The and filter filters any tiddlers it has at the time of filtering.
>[tag[foo]][and[tag:bar]]
>for instance finds all tiddlers tagged "foo" and "bar".

Two different type of "tag" keyword usage.
first: [tag[foo]]
second [and[tag:bar]]

Introduces a new "and" keyword.

I know, that implementing this syntax as it is, is "relatively easy"
because it fits the existing core filter structure. But it will be
confusing for users.

>To get tiddlers tagged foo _or_ bar use
>[tag[foo]][tag[bar]]
There is _no_ keyword for "or" but there was one for "and" above ...

>To get all tiddlers tagged foo and bar and not tagged xyz you would use.
>
>[tag[foo]][and[tag:bar]][and[!tag:xyz]]
[and[!tag:xyz]]

While the exclamation mark makes sense for most programmers, it won't
for most users. I'm in favor of the MatchTagsPlugin mechanism like
[tag[this AND NOT that]]

There are some more ... [is[]] [isnot[]] and !=not from above ....

====
There has been a discussion, where Jon and Eric did argument about the
pro and cons of both systems.
But I can't remember if it's at Dev or TiddleWeb group. I'm even not
sure if it was about the filters space. ...
If I find the link, I'll post it :)

-m



Message has been deleted

Måns

unread,
May 15, 2012, 1:45:51 AM5/15/12
to TiddlyWiki
Hi Tobias

> - would you know if they behave well / work nicely with MatchTagsPlugin?

I think they do ... I can't find an example atm - however I'm sure
I've combined the extended list filter syntax with matchtags syntax at
some point...
I will return later with an example - or create a testexample...

Cheers Måns Mårtensson

Måns

unread,
May 15, 2012, 9:31:08 AM5/15/12
to TiddlyWiki
Hi Tobias

> I think they do ... I can't find an example atm - however I'm sure
> I've combined the extended list filter syntax with matchtags syntax at
> some point...
> I will return later with an example - or create a testexample...

I couldn't make them work together :-(

http://testfiltrematchtags.tiddlyspace.gir.dk/#Test

Cheers Måns Mårtensson

rakugo

unread,
May 15, 2012, 10:30:56 AM5/15/12
to TiddlyWiki
I believe it requires TiddlySpaceFilters as TiddlySpaceFilter extends
the 'is' filter.
There's no reason this couldn't be repurposed into a separate plugin
which removes the tiddlyspace specific is filters
e.g.
config.filterHelpers = { is: {} }

However you have to bear in mind that the TiddlySpaceFilters plugi

The [is[image]] and [is[svg]] filters requires the ImageMacroPlugin
because of these 2 lines

config.filterHelpers["is"].image = config.macros.image.isImageTiddler;
config.filterHelpers["is"].svg = config.macros.image.isSVGTiddler;

I've attempted to fix it up without these so it *should* work in a
standalone TiddlyWiki:
http://filterstw.tiddlyspace.com/tiddlers.wiki#TiddlySpaceFilters2

Feel free to repurpose it to whatever needs you may have if that
doesn't quite do the job :)

On May 14, 8:16 pm, Tobias Beer <beertob...@googlemail.com> wrote:
> @Jon,
>
> ExtraFiltersPlugin states that it requires TiddlySpaceFilters and
> ImageMacroPlugin. Is that really the case? Or is it rather that some
> functionality is only available if indeed those two are present?
>
> Also, those filter rules do not seem to always combine. Looking at {has}
> and {startsWith} it seems that the result list is always created based on
> all tiddlers. Why is that? How about changing forEachTiddler, so that you
> can run it against a preexisting set of tiddlers, e.g.
>
> this.forEachTiddler = function(callback*, tids*) {
>
> > var t*, ts = tids || tiddlers*;
> > for(t in *ts*) {

Måns

unread,
May 15, 2012, 10:51:27 AM5/15/12
to TiddlyWiki
Hi Jon

Would you happen to know how to make the standard filter syntax allow
more than one word in an empty message?
<<list filter [tag:someNoneExistingTag]][emptyMessage:"message with
several words"]>>
only displays:
"message

Example: http://testfiltrematchtags.tiddlyspace.gir.dk/#Test

Is this a bug?

Cheers Måns Mårtensson

rakugo

unread,
May 17, 2012, 3:29:49 PM5/17/12
to TiddlyWiki
Syntax should
be
<<list filter [tag[someNoneExistingTag]]
emptyMessage:"message with several words">>

Måns

unread,
May 17, 2012, 4:37:21 PM5/17/12
to TiddlyWiki
Hi Jon

> Syntax should be
> <<list filter [tag[someNoneExistingTag]] emptyMessage:"message with several words">>

Aah -My fault - I didn't read the example right...

Thanks.

Cheers Måns Mårtensson

Måns

unread,
May 21, 2012, 5:59:41 AM5/21/12
to TiddlyWiki
Hi Jon

> I've attempted to fix it up without these so it *should* work in a
> standalone TiddlyWiki:http://filterstw.tiddlyspace.com/tiddlers.wiki#TiddlySpaceFilters2
>
> Feel free to repurpose it to whatever needs you may have if that
> doesn't quite do the job :)

I've tried to make use of TiddlySpaceFilters2 on TiddlySpot (a
standard/vanilla TW) - without luck..

It seems that it is still dependant on being hosted on
tiddlyspace ....

http://xtrafilters.tiddlyspot.com/

username: xtrafilters
password: tiddlywiki

Please feel free to make any changes to the xtrafilters tiddlyspot-TW
as a sandbox - for testing...

Cheers Måns Mårtensson
Reply all
Reply to author
Forward
0 new messages