New tutorial on TiddlyQuickly - Creating custom lists of tiddlers using widgets and filters (9 slides)

509 views
Skip to first unread message

David Gifford

unread,
Feb 24, 2014, 11:51:11 AM2/24/14
to tiddl...@googlegroups.com
Here is the link

http://giffmex.org/TiddlyQuickly.html

Enjoy! Dave

Jeremy Ruston

unread,
Feb 24, 2014, 12:32:36 PM2/24/14
to TiddlyWiki
Great stuff, Dave.

I did notice a couple of small points:

In example two of slide 5, you'd be better off with this simpler way to get each item on a separate line:

<$list filter="[tag[Mexico City]]">
<$link to={{!!title}}><$view field="title"/></$link>
</$list>

In the bullet list example of slide 5, you should move the <ul></ul> tags up so that they wrap around the list widget. The way you've got it at the moment it's actually generating a separate list (with a single item) for each entry.

In slide 6, there is some confusion about the transclude widget needing space around it. The issue is the old, old, old one that if you want the content of an element to be parsed in block mode, then you need to have a line break immediately after the opening element. So, your example would be better written as:

<$list filter="[tag[Mexico City]]">

<$link to={{!!title}}><$view field="title"/></$link>

<$transclude/>

</$list>

Also in slide 6, you're using the transclude widget to display other fields. It may be worth pointing out that transclusion wikifies the field; if you don't want that then you should use the view widget.

The examples on slide 7 use the obsolete itemClass attribute; it is no longer required.

In slide 8 you recommend using the transclude widget to display the tags field; better to use the view widget so that the tags don't get wikified.

There is no filter operator called "tagged", as it mentions in slide 8; there is one called "untagged" though.

Slide 9 includes several examples using the <br> tag which would be better if you triggered block mode with a line break after the opening tag. For example, your photo example should be:

<$list filter="[tag[Mexico City]]">

<$link to={{!!title}}><$view field="title"/></$link>

<$transclude/>

</$list>

Best wishes

Jeremy




--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

David Gifford

unread,
Feb 24, 2014, 12:41:21 PM2/24/14
to tiddl...@googlegroups.com
Yikes! Okay I will make the changes. As for the 'tagged' filter, I thought I had seen it somewhere, but am probably thinking of 'listed'. I was going to ask here about 'tagged', but then thought, 'Why don't I just create a list filtered with tagged, and see if it does something. It appeared to do what I mention in the tutorial, so I figured it was something I remembered but that wasn't documented.

Jeremy Ruston

unread,
Feb 24, 2014, 12:47:46 PM2/24/14
to TiddlyWiki
The other thing I should have said is that the behaviour for parsing the content of HTML elements and widgets is changing in 5.0.8.

Previously, you could trigger block mode for an element or widget by ensuring that the opening tag is followed immediately by a line break.

In 5.0.8 and later, block mode is triggered with *two* line breaks after the opening tag.

The positive effect of this change is that it makes it possible to write the following without TW5 inserting paragraph tags:

<div>
<h1>My manual heading</h1>
</div>

The burden for upgraders from the change is that many times you'll need to insert an extra line break after element/widget tags that should be in block mode. 

Best wishes

Jeremy



--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

David Gifford

unread,
Feb 24, 2014, 1:44:28 PM2/24/14
to tiddl...@googlegroups.com, jeremy...@gmail.com
Hi Jeremy, thanks for the information. I am still left with a few questions or comments.

1. Slide 5: I agree that my way is wrong and not doing what I wanted it to. But I tried numerous configurations of what you were saying about wrapping <ul> around the entire list, and it didn't work. Can you type up what it should be?

2. Slides 6-8 I made the changes.

3. On slide 9, the reason I didn't invoke block mode is that I don't want the list items to appear double-spaced. When I pasted in your version, it rendered the list as double spaced. Doing it with <br>leaves the list items single-spaced.

Jeremy Ruston

unread,
Feb 24, 2014, 1:51:30 PM2/24/14
to David Gifford, TiddlyWiki
Hi Dave

On Mon, Feb 24, 2014 at 6:44 PM, David Gifford <dgif...@crcna.org> wrote:
Hi Jeremy, thanks for the information. I am still left with a few questions or comments.

1. Slide 5: I agree that my way is wrong and not doing what I wanted it to. But I tried numerous configurations of what you were saying about wrapping <ul> around the entire list, and it didn't work. Can you type up what it should be?

In 5.0.7, this should work:

<ul><$list filter="[tag[introduction]]"><li><$link to={{!!title}}><$view field="title"/></$link></li></$list></ul>

In 5.0.8, you can instead type it with line breaks:

<ul>
<$list filter="[tag[introduction]]">
<li>
<$link to={{!!title}}>
<$view field="title"/>
</$link>
</li>
</$list>
</ul>
 

2. Slides 6-8 I made the changes.

3. On slide 9, the reason I didn't invoke block mode is that I don't want the list items to appear double-spaced. When I pasted in your version, it rendered the list as double spaced. Doing it with <br>leaves the list items single-spaced.

That makes sense.

Thanks for your patience with this Dave, much appreciated.

Best wishes

Jermey.

Stephan Hradek

unread,
Feb 25, 2014, 4:58:31 AM2/25/14
to tiddl...@googlegroups.com
Hi Dave!

If the <$link> should link to {{!!title}} you can omit the "to" attribute. So both are equivalent:

<$link to={{!!title}}><$view field="title"/></$link>

<$link><$view field="title"/></$link>


 

David Gifford

unread,
Feb 25, 2014, 7:12:50 AM2/25/14
to tiddl...@googlegroups.com
Thanks Stephan that is much more efficient. I will get to thtat soon.


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/2Bl9rx05jqU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.



--
David Gifford
Christian Reformed World Missions, Mexico City
Reply all
Reply to author
Forward
0 new messages