Hi Chris,

thanks for feedback.

I've implemented your mentioned changesabove  -> that will remove all links 
- also from the last level of TOC 'Story 1, Story 2 etc.'

How can this be done:
3) display the tiddler's caption/title by itself for tiddlers that have 
nothing below them in the ToC hierarchy. (If you wanted, you could make 
just these captions tiddler links) 

Thanks
Stefan
clutterstack schrieb am Dienstag, 12. Jänner 2021 um 22:55:47 UTC+1:

> Hi Stefan,
>
> It looks like you'd like to modify the behaviour of the 
> toc-selective-expandable macro. The necessary changes for this particular 
> case would be contained within the toc-linked-selective-expandable-body 
> macro. Both are defined in $:/core/macros/toc.
>
> You'd need to redefine (override) toc-linked-selective-expandable-body to:
>
> 1) remove the tiddler link
> 2) display the tiddler's caption/title within the fold/unfold button, for 
> tiddlers that have more tiddlers downstream in the ToC, and 
> 3) display the tiddler's caption/title by itself for tiddlers that have 
> nothing below them in the ToC hierarchy. (If you wanted, you could make 
> just these captions tiddler links)
>
> I suggest making a new macro tiddler (tag it with $:/tags/Macro) with 
> something like the following in it. I've highlighted (I think) all the 
> changes I made. Obviously anything that's commented out could just be 
> removed.
>
> \define 
> toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter,exclude,path)
> <$qualify name="toc-state" title={{{ 
> [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] 
> }}}>
>   <$set name="toc-item-class" filter=<<__itemClassFilter__>> 
> emptyValue="toc-item-selected" value="toc-item" >
>     <li class=<<toc-item-class>>>
>       <!--<$link to={{{ [<currentTiddler>get[target]else<currentTiddler>] 
> }}}> -->
>           <$list filter="[all[current]tagging[]$sort$limit[1]]" 
> variable="ignore" emptyMessage="<$button 
> class='tc-btn-invisible'>{{$:/core/images/blank}} <<toc-caption>>
> </$button>">
>           <$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
>             <$button setTitle=<<toc-state>> setTo="open" 
> class="tc-btn-invisible tc-popup-keep">
>               {{$:/core/images/right-arrow}}<<toc-caption>>
>             </$button>
>           </$reveal>
>           <$reveal type="match" stateTitle=<<toc-state>> text="open">
>             <$button setTitle=<<toc-state>> setTo="close" 
> class="tc-btn-invisible tc-popup-keep">
>               {{$:/core/images/down-arrow}}<<toc-caption>>
>             </$button>
>           </$reveal>
>         </$list>
>        <!-- <<toc-caption>> -->
>       <!--</$link> -->
>       <$reveal type="match" stateTitle=<<toc-state>> text="open">
>         <$macrocall $name="toc-selective-expandable" 
> tag=<<currentTiddler>> sort=<<__sort__>> 
> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> 
> path=<<__path__>>/>
>       </$reveal>
>     </li>
>   </$set>
> </$qualify>
> \end
>
> The definition of toc-caption can be found at the top of 
> $:/core/macros/toc.
>
> Hope that helps,
> Chris
> On Tuesday, January 12, 2021 at 2:49:24 AM UTC-5 schlechter...@gmail.com 
> wrote:
>
>> Hello,
>>
>> I would like to expand the next level of entries by clicking on title in 
>> TOC ( as it is by clicking on '>') instead of opening the tiddler.
>>
>> [image: TOC behavior.jpg]
>>
>> How can I archieve that?
>>
>> Thanks
>> Stefan
>>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/27a82869-d913-4129-ba0a-235d5675139dn%40googlegroups.com.

Reply via email to