Inc plugin - Enhance transclusion by including tiddlers with an on-hover toolbar

https://tobibeer.github.io/tw5-plugins/#inc

I was looking around for ways to style transcluded tiddlers and found Tobi Beer’s inc plugin.

Instead of the standard {{ Transcluded Tiddler }} syntax, you use this macro instead:

<<{ [[Transcluded Tiddler]]>>

In the macro file, I added the linked name of the transcluded tiddler by adding this line:

<p class="tbinc-title">[[$tiddler$]]</p>

I wanted the transcluded content to look different, so I gave it a background and some padding by editing the styles file:

.tb-inc {
background-color: #F0F8FF;
padding: 2px 10px 2px 20px;
}

p.tbinc-title {
font-size: small;
text-align: right;
margin-right: 10px;
}

And here’s a screenshot with part of tonight’s meal:

Update: I realize because of the way that I’ve added the title, you can add the name of a non-existent tiddler, and it will transclude it in such a way that you can click the tiddler title to create the tiddler with that name.

3 Likes

Thanks for sharing this. I’ve been using #inc for quite some time, but never took the time to think about how to really make use of it like this.