Questions about "Simple Alphanumeric Pagination"

@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.

1 Like

@saqimtiaz Thanks and sorry. Overlooked @Mohammad’s comment.

@Mohammad Thanks. Works exactly as expected.

@Mohammad I add a selection:

<span style="color: rgb(255,201,102)">
Anzeige von: </span>&nbsp;
<$checkbox field="texTid" checked="[!has[Draft.of]!is[system]has[erstellt]" unchecked="" default="[!has[Draft.of]!is[system]has[erstellt]"> Text Tiddler </$checkbox>&nbsp; 
<$checkbox field="allTid" checked="[!is[system]" unchecked="" default="[!has[Draft.of]!is[system]has[erstellt]" field="ort" unchecked="" field="texTid" unchecked=""> alle Tiddler </$checkbox>&nbsp;
<$checkbox field="ort" checked="[is[system]" unchecked="" default="[!has[Draft.of]!is[system]has[erstellt]"
field="texTid" unchecked=""> System </$checkbox> &nbsp;&nbsp; &nbsp; &nbsp; 
<span style="color: rgb(255,201,102)">
sortiert nach: </span>&nbsp;
<$checkbox field="dat" checked="!sort[published]]" unchecked="" default="!sort[published]]"> nach Datum </$checkbox>&nbsp; 
<$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!

No, a hover effect to the letter buttens:

like e.g.

grafik

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.

@Mohammad
Thanks, very nice! :+1:


Do you have an idea to my post 5?

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:

  • startup: all tiddlers are shown - no letter button is selected
  • selection between grafik works fine
  • changing sort criteria grafik doesn’t change the output list

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)" >&nbsp;<$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].

@Mohammad Ups - you’re right.
Thanks for the hint - works like a charm now.

@Mohammad

I add an additional checkbox to do a reverse sort order:

How can that be implemented in the scope of the macro?

Thanks
Stefan

1 Like

@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}] }}}/>

@Mohammad
Thank you :+1:

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

@Mohammad
Any idea to my previous post?

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.