Searching through archives, how-to's and other resources, it seems like 
bookmarks and associated functionality are one of the more popular uses for 
TW, especially when first starting out. I decided to try my hand at it, and 
it was actually quite a learning experience. Consider the TW here:

https://dl.dropboxusercontent.com/s/pzgn3bukhi6yx4d/bookmarks.html

Some things to note:

1. The default view is of all bookmarks sorted under their associated tags.
2. Bookmarks can show up under multiple tags. That's a feature, because I 
often like to cross-reference a single resource multiple ways.
3. There is a select widget at the top that allows you to quickly filter to 
see a specific tag's bookmarks.
4. The select widget also has an "all by names" option (up one from the 
default "all by tags" option) to see all the bookmarks without tags, sorted 
by name (because sometimes Ctrl-F is the fastest way to find something :).
5. There is also an "untagged" option at the bottom of the select widget to 
show any bookmarks that aren't tagged (since otherwise they won't show up 
in the list).
6. Actually uses a regex filter under the covers. ("Now you have two 
problems <http://regex.info/blog/2006-09-15/247>.")
7. Does some things with set widgets turning tv-wikilinks off and on so 
that when displaying the title of a bookmark (which links to the external 
site), any CamelCase words don't show up as wikilinks.

I almost gave up a few times, because figuring all the above out wasn't 
easy, and I had a vision I wanted to work. But glad I stuck with it. It 
was..."fun." :)

Besides all the tiddlers for each bookmark, the entire thing is implemented 
solely in the Bookmarks tiddler, as follows:

''Tag:'' <$select tiddler="$:/temp/bookmarkfilter">
<option value="\W">(all by name)</option>
<option value="\w" selected="true">(all by tags)</option>
<$list filter="[tags[]sort[]]">
<option><$view field="title"/></option>
</$list>
<option value="untagged">(untagged)</option>
</$select>

<$reveal type="nomatch" state="$:/temp/bookmarkfilter" text="\W">
<$list 
filter="[tags[]regexp{$:/temp/bookmarkfilter}!is[system]sort[title]]">
<$transclude tiddler="$:/core/ui/TagTemplate" mode="inline"/>
<ul>
<$list filter="[all[current]tagging[]sort[title]]">
<li>
<$set name="tv-wikilinks" value="no">
<$set name="href" value={{!!text}}>
<a target="_blank" href=<<href>> >''{{!!title}}''</a>
</$set>
</$set>
<$set name="tv-wikilinks" value="yes">
<$link>(edit)</$link>
</$set>
</li></$list></ul>
</$list>
</$reveal>
<$reveal type="match" state="$:/temp/bookmarkfilter" text="\W">
<ul>
<$list filter="[tags[]tagging[]sort[title]]">
<li>
<$set name="tv-wikilinks" value="no">
<$set name="href" value={{!!text}}>
<a target="_blank" href=<<href>> >''{{!!title}}''</a>
</$set>
</$set>
<$set name="tv-wikilinks" value="yes">
<$link>(edit)</$link>
</$set>
</li>
</$list>
</ul>
</$reveal>
<$reveal type="match" state="$:/temp/bookmarkfilter" text="untagged">
<ul>
<$list filter="[untagged[]!is[system]!title[Bookmarks]sort[title]]">
<li>
<$set name="tv-wikilinks" value="no">
<$set name="href" value={{!!text}}>
<a target="_blank" href=<<href>> >''{{!!title}}''</a>
</$set>
</$set>
<$set name="tv-wikilinks" value="yes">
<$link>(edit)</$link>
</$set>
</li>
</$list>
</ul>
</$reveal>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to