Add a footer to tiddlers

I’d like to add a footer to my tiddlers, particularly those with a specific tag. How do I do this? Thank you.

You can create a new template tiddler eg:

  • _:/my-ViewTemplate/footer and
  • tag it $:/tags/ViewTemplate

With the following content

<%if [<currentTiddler>tag[my-tag]]%>

----

Your footer comes here

<%endif%>

Then you can tag your tiddler eg: my-tag and it will show the template tiddler.

Once everything works you can rename _:/my-ViewTemplate/footer to $:/my-ViewTemplate/footer so it will be a system tiddler and it will be hidden in the Recent tab by default.

For testing I always use _:/ prefix, since it will show up in the Recent tab for easy access.

___my-ViewTemplate_footer.json (223 Bytes)

4 Likes

I played around with view- and edit-templates recently and the mechanism is working quite well for me.
What I am wondering is how can I replace the standard view/edit-template for the text of a tiddler (or hide it at least)?

have you tried setting the field hide-body=yes on selected tiddlers.

keeping in mind the view template is critical to tiddlywikis operation. for example setting tiddlers, tag manager etc,.

you could also create a view template cascade that does not display the body on tiddlers that meet some criteria.

perhaps if you describe why you want to do this. for example try code-body=yes on a tiddler. tiddlywiki also displays differently using the type field.

No I didn’t, because it didn’t came to my mind. :wink:
It’s in fact an effectively solution for hiding the view body :+1:

Sorry, reading my question again I see that I mixed up two different things - the view-template and the edit-template.

I would like to use some sort of edit-form (realized with edit-templates) and hiding the edit-field for the default text. When several users are editing the Wiki this edit-form can help maintain the same layout for each tiddler. Otherwise each user could came up with a different layout.

If this could be done with an edit template cascade, too, I would be glad to get some simple instructions for building a cascade on my own - thank you in advance.

You can also you code-body: yes, so you’ll see the text of the tiddler, instead of rendering it.

I was thinking about your advice, but I couldn’t see the benefit.
Meanwhile I was able to find a solution for my needs, but there are still questions.
Please have a look at my new topic.