@Mohammad Thanks. But it created an error that said:
\define simple-pagination(scope:"[all[tiddlers]!is[system]]", stateTiddler:"")
Undefined widget 'let' \end
What could this be? I am running TW5.2.0
@Mohammad Thanks. But it created an error that said:
\define simple-pagination(scope:"[all[tiddlers]!is[system]]", stateTiddler:"")
Undefined widget 'let' \end
What could this be? I am running TW5.2.0
You need TW 5.2.1 for the $let widget.
@Mohammad I add a selection:
<span style="color: rgb(255,201,102)">
Anzeige von: </span>
<$checkbox field="texTid" checked="[!has[Draft.of]!is[system]has[erstellt]" unchecked="" default="[!has[Draft.of]!is[system]has[erstellt]"> Text Tiddler </$checkbox>
<$checkbox field="allTid" checked="[!is[system]" unchecked="" default="[!has[Draft.of]!is[system]has[erstellt]" field="ort" unchecked="" field="texTid" unchecked=""> alle Tiddler </$checkbox>
<$checkbox field="ort" checked="[is[system]" unchecked="" default="[!has[Draft.of]!is[system]has[erstellt]"
field="texTid" unchecked=""> System </$checkbox>
<span style="color: rgb(255,201,102)">
sortiert nach: </span>
<$checkbox field="dat" checked="!sort[published]]" unchecked="" default="!sort[published]]"> nach Datum </$checkbox>
<$checkbox field="abc" checked="sort[title]]" unchecked="" default="sort[published]]" field="dat" unchecked=""> alphabetisch </$checkbox>
<br>''Filter is:'' {{!!texTid}}{{!!dat}}
What is the correct syntax to display content according the selection using {{!!texTid}}{{!!dat}}
?
NOK with <<simple-pagination {{!!texTid}}{{!!dat}}>>
Thanks
Stefan
How to add CSS for hover-effect?
Thanks
If you mean a hover effect on the result! One simple solution is to warp links in a span with title attribute!
add a class for button with the below a css like below:
<style>
.myclass:hover{
color:white;
background-color:green;
}
</style>
Then in line 11: change <$button>
as below
<$button class="myclass">
I am sure you will get better feedback here, or you can have a look at w3school for this.
To be honest, I do not use such syntaxes even if they work!
I am not sure what you want to achieve, but I absolutely will go as below (based on your wikitext above):
<$macrocall $name="simple-pagination" scope={{{ [{!!textTid}addsuffix{!!dat}] }}} />
@Mohammad
Thanks for your feedback - the idea is to customize the output…
I tested it:
Is there an additional refresh of the list needed?
Attached for testing: simple-pagination-test.json (6.3 KB)
Thanks
Stefan
Hi Stefan,
I checked your code
<!-- generate outputs -->
<$scrollable class='tc-scrollable-demo'>
<span style="font-size: 0.8em;">
<$list filter="[subfilter<__scope__>filter<listfilter>!sort[published]]"
<br>
<$link to={{!!title}}><$view field="title"/>
</$link>
<span style="font-size: 0.7em; color:rgb(144, 238, 144)" > <$view field="erstellt"/></span>
<br>
</$list>
</span>
</$scrollable>
It seems you have hard coded the filter="[subfilter<__scope__>filter<listfilter>!sort[published]]"
so you always sort your result with !sort[published]
.
I add an additional checkbox to do a reverse sort order:
How can that be implemented in the scope of the macro?
Thanks
Stefan
@StS
If your question is to add another part to the filter (scope) then you can use below syntax
<$macrocall $name="simple-pagination" scope={{{ [{!!textTid}addsuffix{!!sort}addsuffix{!!dat}] }}}/>
This shows me all tiddlers (according my selections):
<$count filter="[subfilter<__scope__>]" />
I would like to see the number of tiddlers, when I filter eg. for button “A”
How can that be done?
Thanks
Stefan
Hi Stefan,
You need filter the scope by your selection, so
<$count filter="[subfilter<__scope__>prefix[A]]" />
will only counts those started with A
.