I have made an alternative layout and would like to use an adapted version of $:/core/ui/ViewTemplate.
Does anyone know how to do that?
I have made an alternative layout and would like to use an adapted version of $:/core/ui/ViewTemplate.
Does anyone know how to do that?
Hi @trend!
When you say you “have made” the alternative layout, you mean you have already successfully implemented all the stuff about what’s where (as described here)… yes? …
And… you’re just stuck on how the tiddlers display within the story river area of the page?
That’s in some ways the easy part. TiddlyWiki is designed so that the tiddler you mention ($:/core/ui/ViewTemplate) builds the tiddler out of the elements tagged $:/tags/ViewTemplate. Change which tiddlers carry this tag, and you change what each tiddler looks like within the story river.
My guess is you probably understand this, and you know how to change which items carry the standard view template tag.
Instead, perhaps you want to leave the normal view template as it is (so the wiki can also have the standard layout with things in the story river looking however they do now), and set up a different configuration for your custom layout.
In that case, orient to your version of the story river tiddler ($:/core/ui/PageTemplate/story which you should clone and rename $:/CUSTOM/ui/PageTemplate/story or something like that). See that at its core, it has a list widget that invokes $:/core/ui/StoryTiddlerTemplate (which is what in turn pulls on the ViewTemplate stuff).
So, CLONE that StoryTiddlerTemplate tiddler, calling it $:/CUSTOM/ui/StoryTiddlerTemplate (or whatever you like — and changing the name in the PageTemplate/story to match), and edit this new clone of the StoryTiddlerTemplate so that it looks for an alternate tag such as $:/CUSTOM/ViewTemplate (instead of the usual $:/tags/ViewTemplate).
Now, you can go around cloning existing view template tiddlers (making variants like $:/CUSTOM/ui/ViewTemplate/title but now with the variant tag), OR you can edit existing shadow templates (such as $:/core/ui/ViewTemplate/title) and just add your new tag to whichever view template elements that you want to apply in BOTH default and custom layout.
Then, find or design any additional templates that should be specific to your custom layout, and tag them with $:/CUSTOM/ViewTemplate …
Last, tinker with the order of the elements by changing their order in the list field of your custom-specific view template tag (or by using list-before and list-after fields of the tag’s child tiddlers, which I do prefer, but which ought not to be mixed-and-matched with drag-in-tag-pill-to-reorder habits, because they work at cross-purposes with each other).
(I hope I’ve got the right stuff chained together in the above; I’m replying on the fly so you can get a jump on your next steps…)
Please follow up if these suggestions aren’t meeting you at the right level.