Hoe can I see all core images?

48 views
Skip to first unread message

joearms

unread,
Dec 15, 2018, 6:50:07 AM12/15/18
to TiddlyWikiDev
This makes a tag with a drop down of all core images

<<tag "$:/tags/Image">>

But this does not list them

<<list-links "[tag[$:/tags/Image]]">>

Any ideas why? 

/Joe

Jeremy Ruston

unread,
Dec 15, 2018, 6:57:29 AM12/15/18
to tiddly...@googlegroups.com
I think it's because the core images tagged $:/tags/Image are actually shadow tiddlers. The "tag" macro looks for shadow tiddlers by default. The list-links macro will only look for shadow tiddlers if you provide an appropriate filter that includes them:

<<list-links "[all[shadows+tiddlers]tag[$:/tags/Image]]">>

"Shadow tiddlers" are the payload tiddlers within plugins. They are hidden from most operations because they are not "real" tiddlers; this is done to reduce clutter.

Best wishes

Jeremy

--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/be61ab04-c9e8-4ae0-aa11-6fd3f3abf843%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

joearms

unread,
Dec 15, 2018, 10:21:32 AM12/15/18
to TiddlyWikiDev
Thank you Jeremy

Next question:  I want to make a neat table of the images

I did this:

<$list filter="[all[shadows+tiddlers]tag[$:/tags/Image]]">
| {{!!title}} | <$transclude /> | 

</$list>

In the hope that if I generated wiki text it would be expanded into a table
but this didn't work so I did this:

<$list filter="[all[shadows+tiddlers]tag[$:/tags/Image]]">
<tr><td>{{!!title}}</td><td><$transclude /></td></tr>
</$list>

Is this the right thing to do? - it's not very elegant

Cheers

/Joe

Jeremy Ruston

unread,
Dec 15, 2018, 10:30:52 AM12/15/18
to TiddlyWikiDev
Hi Joe

I did this:

<$list filter="[all[shadows+tiddlers]tag[$:/tags/Image]]">
| {{!!title}} | <$transclude /> | 

</$list>

In the hope that if I generated wiki text it would be expanded into a table
but this didn't work so I did this:

<$list filter="[all[shadows+tiddlers]tag[$:/tags/Image]]">
<tr><td>{{!!title}}</td><td><$transclude /></td></tr>
</$list>

Is this the right thing to do? - it's not very elegant

That’s right. The shortcut table syntax is parsed as an entire static HTML table ie table, tbody, tr, and td.

The shortcut syntax is generally trying to be expressive but simple and easy to type, with the widget/element syntax waiting in the wings when you need more flexibility, as when constructing a table dynamically.

Best wishes

Jeremy

joearms

unread,
Dec 15, 2018, 1:06:55 PM12/15/18
to TiddlyWikiDev


On Saturday, 15 December 2018 16:30:52 UTC+1, Jeremy Ruston wrote:
Hi Joe

I did this:

<$list filter="[all[shadows+tiddlers]tag[$:/tags/Image]]">
| {{!!title}} | <$transclude /> | 

</$list>

In the hope that if I generated wiki text it would be expanded into a table
but this didn't work so I did this:

<$list filter="[all[shadows+tiddlers]tag[$:/tags/Image]]">
<tr><td>{{!!title}}</td><td><$transclude /></td></tr>
</$list>

Is this the right thing to do? - it's not very elegant

That’s right. The shortcut table syntax is parsed as an entire static HTML table ie table, tbody, tr, and td.


Hi Jeremy ...

I see - was expecting to that:
 
          <$list filter="[all[shadows+tiddlers]tag[$:/tags/Image]]">
             | {{!!title}} | <$transclude /> |
        </$list>

Would be expanded into wiki text which in turn would be expanded into HTML

So I thought (wrongly) that I should write

     <$list filter="[all[shadows+tiddlers]tag[$:/tags/Image]]">
         <$wiki2html>
             | {{!!title}} | <$transclude /> |
          </$wiki2html>
        </$list>
 
and wasted an hour or so Googling and reading the documentation searching for the non-existent
$wiki2text (the magic thing that would turn wiki text into HTML)




The shortcut syntax is generally trying to be expressive but simple and easy to type, with the widget/element syntax waiting in the wings when you need more flexibility, as when constructing a table dynamically.

Bearing this in mind I ended up with

<table>
<tr class="evenRow"><th align="left">title</th><th>image</th></tr>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Image]]">
<tr><td>{{!!title}}</td><td><$transclude /></td></tr>
</$list>
</table>

I can't make my mind up if I like this or not - it mixes three abstraction layers - I need to know 
wikiText syntax, html syntax and need to know the specific html text the wiki text expand into.

Actually having written this it now looks pretty simple - 

Many of my problems arise from the documentation - there are many good examples, so my problem
is one of "guess the semantics" - the code examples work, but I have to guess the semantics (things like
the lifetimes of variable bindings, the scope of variables, evaluation order etc.)

Thanks BTW for your patience in answering my questions.

Cheers

/Joe
Reply all
Reply to author
Forward
0 new messages