[TW5] How to limit the display of tags to only certain options

98 views
Skip to first unread message

Matabele

unread,
Jan 17, 2016, 3:46:03 AM1/17/16
to TiddlyWiki
Hi

A problem has arisen -- how might a filter be constructed to view only the tags present, from a reference list of options.

Take for example a 'tags' field containing the list: 
done mytag [[another tag]] task [[yet another tag]]

-- how would a filter be constructed to list only those tags contained in the reference list of options:
todo active done
-- in other words, the output in this case should be: 'done'

-- or, if the reference list were:
mytag [[another tag]] calender meeting
-- the output should be: 'mytag [[another tag]]'

In other words -- what is missing in this filter expression?
[is[current]list[!!tags]what[is]missing[here]]

regards

Tobias Beer

unread,
Jan 17, 2016, 6:21:26 AM1/17/16
to TiddlyWiki
Hi Matabele: have a look at tobibeer/contains.

Matabele

unread,
Jan 17, 2016, 7:57:11 AM1/17/16
to TiddlyWiki
Hi Tobias

Thanks -- seem to think on similar lines; whilst you were answering, I wrote a somewhat simpler leave[] filter, specifically for the purpose.

Play around with the demo here.

regards

Alex Hough

unread,
Jan 17, 2016, 4:15:01 PM1/17/16
to TiddlyWiki
the cycle operator gave me an idea, circular stories

There could be a list of tiddlers in a field, each with content. The reader would start anywhere they like and cycle though the story.

"It's non-linear: it's circular!"

Alex


--
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/15a71658-a819-4817-ba5d-2211fa0eb1e0%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Mat

unread,
Jan 17, 2016, 4:26:09 PM1/17/16
to tiddl...@googlegroups.com
AlexHough wrote:
the cycle operator gave me an idea, circular stories

Haha! Even better; circular reasoning! Permanently win an argument by giving your opponent the TW and he be stuck in an endless loop!



@Matabele

Thank you for this and the cycle tags thing. It will come to immediate use for me!

<:-)

Matabele

unread,
Jan 18, 2016, 1:06:33 AM1/18/16
to tiddl...@googlegroups.com
Hi Alex

A start for your circular story 'slideshow': 

1. paste this into a tiddler:
<span class="story-button-left"><$button class="tc-btn-invisible"><$action-listops $tiddler="MySubStoryList" $field="list" $subfilter="+[!cycle{!!story}]"/>{{$:/core/images/chevron-left}}</$button></span>
<span class="story-button-right"><$button class="tc-btn-invisible"><$action-listops $tiddler="MySubStoryList" $field="list" $subfilter="+[cycle{!!story}]"/>{{$:/core/images/chevron-right}}</$button></span>

<$navigator story="MySubStoryList" history="MySubHistoryList">
<$list filter="[list[MySubStoryList]]" history="MySubHistoryList">
<div>

!
<span class="story-title"><$view field="title"/></span>
<$transclude mode="block"/>
</div>
</$list>
</$navigator>
2. Enter the list of tiddlers making up the story into the !!story field of this tiddler
3. Paste this into a stylesheet:
.story-button-left {
   
float: left;
    position
: relative;
}
.story-button-right {
   
float: right;
    position
: relative;
}
.story-title {
    left
:5%;
    position
: relative;
}

regards
Reply all
Reply to author
Forward
0 new messages