>
> Hi Simon, Thank you for responding,
> I'm building a game website and I wanted tabs at the top to filter wikis
> by subject. In most 'standard' websites there are menu items that will
> take you to a given page or section of the site; I want those menu items
> to select which tiddlers appear, without going to another page.. Pretty
> much exactly like http://haltu.github.io/muuri does it, except by subject
> rather than color. The menu items would be Players, Characters, The Game
> Master, The Game World, and Mechanics. This *very tentative *site is at
> https://thpmefsl4nj2xg7nynj04q-on.drv.tw/Harn%20Game%20Website/index.html
>
>
that's a cool idea :) !
yes it's doable - my first idea would be modifying the story list in the
tiddler $:/core/ui/PageTemplate/story
there's a line <$list filter="[list[$:/StoryList]" ... />. That filter can
be extended, you could make it to [list[$:/StoryList]tag[Characters]] and
the story would show only Tiddlers tagged with "Characters" - more advanced
filtering would also be possible, by field, by title - how you want
Now if you create some dropdown buttons on top of your page that let you
select "Players" "Characters" ... those buttons could set the text of a
tiddler, say - "$:/state/storyfilter", to the desired filter like
tag[Players]
if you modify the line in $:/core/ui/PageTemplate/story to:
<$list filter="[[$:/state/storyfilter]is[missing]]">
<$list filter="[list[$:/StoryList]]" ... here the rest of what's already
there/>
</$list>
<$list filter="[[$:/state/storyfilter]!is[missing]]">
<$vars myFilter={{$:/state/storyfilter}}>
<$list filter="[list[$:/StoryList]<myFilter>]" ... here the rest of what's
already there/>
</$vars>
</$list>
... then the story gets filtered by the filter in $:/state/storyfilter
the buttons on top of the page must make sure that a correct filter lands
in $:/state/storyfilter
such a button would be:
<$button set="$:/state/storyfilter" setTo="tag[Players]">Players</$button>
and there should be something to delete the $:/state/storyfilter tiddler
like:
<$button><$action-deletetiddler $tiddler="$:/state/storyfilter"/>Full
Story</$button>
--
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 [email protected].
To post to this group, send email to [email protected].
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/b40db6bc-0eb0-4a16-be57-8eb8d04d5f45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.