I apologize for the question which I think is quite stupid, but I’m puzzled. Currently I have too many buttons in the page toolbar, so I thought of making a couple of clones of $:/core/ui/Buttons/more-page-actions
so as to have all the functionalities well ordered, but without taking up too much space.
So I started by taking $:/core/ui/Buttons/more-page-actions
and making a copy. And I thought, I change the filter that is to find the content of $:/core/ui/Buttons/more-page-actions
and put my own to find the buttons I want in that, for example a filter like [tag[MoreActions2]].
Now, this didn’t quite work out as well as I’d hoped. But, and here I’m puzzled, for some reason the same filter worked at some point with one of the buttons I wanted to tag (I don’t know why and I unfortunately haven’t been able to replicate it). I could change my approach, but since I think I’ve glimpsed the solution (and because at the moment I have no idea how to do it any other way), I thought I’d ask.
- Changing the filter in a way like this would work? (Exactly as I wrote it I’m afraid not because I already tried it and it doesn’t work, but I mean, in a similar way to that) Or is it better to try another way?
The piece of code in question (where I would change the filter and nothing else):
Before:
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]" variable="listItem">
After:
<$list filter="[tag[MoreActions2]!has[draft.of]]" variable="listItem">
Full code of $:/core/ui/Buttons/more-page-actions
, for reference:
\whitespace trim
\define config-title()
$:/config/PageControlButtons/Visibility/$(listItem)$
\end
<$button popup=<<qualify "$:/state/popup/more">> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{$:/core/images/down-arrow}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/More/Caption}}/>
</span>
</$list>
</$button><$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">
<div class="tc-drop-down">
<$set name="tv-config-toolbar-icons" value="yes">
<$set name="tv-config-toolbar-text" value="yes">
<$set name="tv-config-toolbar-class" value="tc-btn-invisible">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]" variable="listItem">
<$reveal type="match" state=<<config-title>> text="hide">
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
<$transclude tiddler=<<listItem>> mode="inline"/>
</$set>
</$reveal>
</$list>
</$set>
</$set>
</$set>
</div>
</$reveal>