I know this is a VERY simple problem but I am afraid I cannot solve it. I want to display the contents of a field in the body of a tiddler with the first few characters removed. I have tried the $view widget with the rest operator but I cannot get the syntax right. Any help would be greatly appreciated to further my understanding.
Small explanation: that code uses a TiddlyWiki widget (<$text text=.../>) to insert the result of a filter run ([{!!mydata}removeprefix[My ]]) as text in the output for your tiddler; this (“textifying” the result of the filter run) is done using a filtered transclusion ({{{ }}}).
if the prefix you want to remove is defined by a more complex criteria (e.g., “remove the first 4 characters”), try something like:
It would be helpful @Rob_Jopling if you illustrated why you want to remove characters, eg what characters as an example. Because depending on this there may be other ways to do this with more useful results etc…
Apologies for making my question too generic. I am developing a wiki as journal for the activities I undertake, and will act as a personal blog when I head to Scandinavia for a 3 month van trip in August.
Each journal tiddler has a title in the form:
YYYYMMDD This the title of the tiddler
The first eight characters are numbers which represent the date. The following characters are a descriptive title.
Separately I have a tiddler which lists all of the journal entries with links to the individual journal tiddlers. I want the list to show the date in the format DDth MM YYYY and below that I want to show the descriptive title. Hence my need to deconstruct the tiddler title.
I hope that helps. Really appreciate your assistance. Each answer deepens my understanding of this great app.
The first block of code works as you have said and explains how the code works.
The second block does not appear to work as I had hoped, probably because I did not explain the problem clearly enough in the question. See amore detailed explanation of what I am trying to achieve in my response to @TW_Tones.
Three curly braces are used for “filtered tranclusions” a shorthand way to “action a filter”. If used as a value to a parameter only the first result is returned.
Personally I customise the new journal buttons to set a journal-date and use this (for listing, testing, formatting, comparison etc…) rather than deconstruct a compound title, which I use a readable form like “23rd June 2023” + more if needed. I can share them if you want.
@Rob_Jopling here is a package that enhances new journal and new journal here button, to save the journal date on creation in a journal-data field. you can then run queries against that and use the title that makes sense. See Settings > Info > Basics for normal customisations title/text of new journal tiddlers. I have tested it on 5.2.7 and the 5.3.x prerelease today.