Filter Items Not Showing Up In Tabs

153 views
Skip to first unread message

James

unread,
Sep 25, 2014, 5:00:53 AM9/25/14
to tiddl...@googlegroups.com
Hi All,

I created a tiddler with the following script to show tabs that tagged with "topictab" tag, but the tab only show content that comes with text.  All filter values are missing.

<<tabs "[tag[topictab]]" "oracle" "$:/state/tab2" "tc-vertical">>

Kindly help

PMario

unread,
Sep 25, 2014, 5:49:22 AM9/25/14
to tiddl...@googlegroups.com
Hi James,

Are you sure, you hit the "add" button near the tag input box?
I did a short text with just tiddler names. No tiddler did contain text. .. it worked.

-m

Jimmy Liew

unread,
Sep 25, 2014, 6:28:11 AM9/25/14
to tiddl...@googlegroups.com
Hi Mario,
LOL... Of course I did.  Let's me clarify more in details about what I have encountered.

I created a tiddler name "assignments - subject #1" and have all my research notes tagged with it.  Consequently I created several orther subject toddlers and I have notes tagged with it.  The subject tiddler has nothing inside except a list filter command to list all the notes.

Now, I created a new tiddler "topictab" and I want all the subject listed as tab and the notes to list as a content.  When I click on the tab, it shows nothing.

But, if I type something in the subject tiddler, the tab tiddler will show only the text I just type.

--
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/cTf0YThlmsA/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/d/optout.


--
--
Best Regards,
Jimmy Liew

Eucaly J

unread,
Sep 25, 2014, 9:24:33 AM9/25/14
to tiddl...@googlegroups.com
Hi James,

I have more complex contents inside tabs, while they perform OK so far.

Things might go wrong in couples of ways, for example, non-proper ending of </$list> to become <$/list> ...

Maybe you can share some of your "list filter command" in "subject #1" and etc ...

Another suggestion is to look into the official TabsMacro : $:/core/macros/tabs

If any variables or parameters go wrong ...

\define tabs(tabsList,default,state:"$:/state/tab",class,template)
<div class="tc-tab-set $class$">
<div class="tc-tab-buttons $class$">
<$list filter="$tabsList$" variable="currentTab">
<$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$" selectedClass="tc-tab-selected">
<$transclude tiddler=<<currentTab>> field="caption">
<$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/>
</$transclude>
</
$button>
</$list>
</
div><div class="tc-tab-divider $class$"/><div class="tc-tab-content $class$">
<$list filter="$tabsList$" variable="currentTab">

<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$">

<$transclude tiddler="$template$" mode="block">

<$transclude tiddler=<<currentTab>> mode="block"/>

</$transclude>

</
$reveal>

</$list>
</
div>
</div>
\end


Jimmy Liew

unread,
Sep 25, 2014, 11:22:26 AM9/25/14
to tiddl...@googlegroups.com
I found the bug!  I have no idea what's the different between these two, but it works.

Method elow will not work:
<ol><$list filter="[tag[assignments - subject 1]sort[title]]">
<li><$link to={{!!title}}><$view field="title"/></$link> </li>
</$list></ol>

Method below works.
<<list-links "[tag[assignments - subject 1]]">>

--
Best Regards,
Jimmy Liew

Jimmy Liew

unread,
Sep 25, 2014, 11:29:50 AM9/25/14
to tiddl...@googlegroups.com
And, if I specify "<<list-links "[is[current]tagging[]sort[title]]">>".  It is not working as well.

--
Best Regards,
Jimmy Liew

Jimmy Liew

unread,
Sep 25, 2014, 11:33:54 AM9/25/14
to tiddl...@googlegroups.com
I hereby conclude that "is[current]tagging[]" is the culprit that cause it fails.  It resolved when I replace it with "tag[subject]"

--
Best Regards,
Jimmy Liew

Evolena

unread,
Sep 25, 2014, 11:40:36 AM9/25/14
to tiddl...@googlegroups.com
I think it's related to the curernt tiddler not being the same according to the context:
- in the tiddler containing the tabs macro, it is this tiddler
- in the content of a tab, it is the tiddler displayed in the tab

In case of doubt, include some <<currentTiddler>> everywhere to check what is happening.

Eucaly J

unread,
Sep 25, 2014, 11:47:39 AM9/25/14
to tiddl...@googlegroups.com
Hi James,

When you transclude tiddlers (in this case, TabsMacro did that for you),
currentTiddler variable might not be assigned as you expected.
That's why "is[current]tagging[]" goes wrong

You can experiment by checking {{!!title}} result from below
(when in tabs, or in the tiddlers itself)

{{!!title}}<br/>

<ol><$list filter="[tag[assignments - subject 1]sort[title]]">
<li><$link to={{!!title}}><$view field="title"/></$link> </li>
</
$list></ol>



James於 2014年9月25日星期四UTC+8下午11時33分54秒寫道:

Jimmy Liew

unread,
Sep 25, 2014, 6:41:25 PM9/25/14
to tiddl...@googlegroups.com
Ohh.. Thanks. 

--
Best Regards,
Jimmy Liew

Reply all
Reply to author
Forward
0 new messages