> 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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to