How to style a custom viewtemplate with the green box style as in section editor

I am using the code mentioned here in a view template.

I would like add some styling to the this viewtemplate so that the output looks similar to the collapsible green box in section editor.

image

Is it possible ?

I found an interesting implementation in AMBIT called subpages.

I modified it to to use in my wiki like this, but i dont know how to change the target from currentTiddler to Journal tiddler. Anyone can please help?

\whitespace trim
<div style="clear:both;">
</div>
<$list filter="[tag<currentTiddler>!hide-subpages[yes]]" variable="none">
<$list filter="[tag<currentTiddler>limit[1]]" variable="none">
<div class="tc-tagged-by" style="float:right;">
<ul>
<details>
<summary>Todolist:</summary>
<$reveal tag="div" class="se-tc-tiddler-body" type="nomatch" stateTitle=<<folded-state>> text="hide" retain="yes" animate="yes">
<$list filter="Work Home Projects" variable=prj>
<$macrocall $name=todolist-ui base={{{ [<prj>addsuffix[/]addsuffix<currentTiddler>] }}} caption="""<h2 style="color:darkred;font-weight:lighter;"><<prj>></h2>""" />
</$list>

It looks like this in my wiki.

Also the float-right is not working as shown in AMBIT

1 Like

This is the code I am trying now

\whitespace trim
<div style="clear:both;">
</div>
<$list filter="[<currentTiddler>!hide-subpages[yes]]" variable="none">
<$list filter="[tag<currentTiddler>!tag[hide-subpage]limit[1]]" variable="none">
<div class="tc-tagged-by" style="float:right;">
<details>
<summary>Todolist:</summary>
<$reveal tag="div" class="se-tc-tiddler-body" type="nomatch" stateTitle=<<folded-state>> text="hide" retain="yes" animate="yes">
<$list filter="Work Home Projects" variable=prj>
<$macrocall $name=todolist-ui base={{{ [<prj>addsuffix[/]addsuffix<currentTiddler>] }}} caption="""<h2 style="color:darkred;font-weight:lighter;"><<prj>></h2>""" />
</$list>

Given below is the filter part in the code given above.

<$list filter="[<currentTiddler>!hide-subpages[yes]]" variable="none">
<$list filter="[tag<currentTiddler>!tag[hide-subpage]limit[1]]" variable="none">

How to modify the filter so that it appears only in Journal tiddler when used via a viewtemplate.

Luckily I was able to modify the filter so as to target the journal tiddler. Thanks for the help

Thanks for sharing

And sorry no one showed up to help – perhaps (but seems unlikely) no one knew how?

:confused:

It was in a way good in terms of learning tiddlywiki. I learned something new by solving it myself

1 Like