Add a footer to your wiki

Code copied from discussion: Adding a page footer to a TiddlyWiki - #6 by telumire

Create a custom layout in a new tiddler, for example:

{{$:/core/ui/PageTemplate}}
<footer>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Footer]!has[draft.of]]" variable="listItem">
<$transclude tiddler=<<listItem>>/>
</$list>
</footer>

Then add the tag $:/tags/Layout, description and name fields, and save the tiddler. Now you can switch to the new layout with ctrl+shift+L. Any tiddlers tagged with $:/tags/Footer will be displayed in the footer.

Add the following CSS in a tiddler tagged with $:/tags/Stylesheet to position the footer at the bottom :

.tc-page-container-wrapper > div {
	height:100vh;
	display: flex;
	flex-direction: column;
	padding:0;
}

footer  {
	flex: 1 1 auto;
	display:flex;
	justify-content:center;
	align-items: end;
	z-index:-1;
	min-height:50px;
}
4 Likes

My TW really does not like this. As soon as I create the layout tiddler I get an error:
Recursive transclude error in transclude widget

Is that error only on viewing the new Layout tiddler? If so, that happens often enough with templates that happen to apply to themselves and recur indefinitely. If you close that tiddler and follow the remaining directions, does it work properly?

1 Like

Adding to what Scott has explained, you can also add the field code-body with value yes to the layout tiddler you create to avoid the recursive tranclusion error.

1 Like

You are right, it does disappear when I close the tiddler.

However, when I use Ctrl+Shift+L I can see the new layout, but I cannot actually get it to switch.

When I add the tag $:/tags/Layout it does not pop up as a known tag.