As a follow-up to my topic for creating a centered layout, I was able to adapt this into a layout using the $:/tags/Layout alternative page layouts mechanism. It works by using a modified $:/core/ui/PageTemplate/story , that combines the sidebar with an additional div.
My only problem is I would like to re-write this line in CenterPageLayout so it does not rely so heavily on using the title operator. I would like to store this list of tiddlers in a field in the same CenterPageLayout tiddler, but I haven’t been able to get this to work.
You don’t need write title operator every time becuase it is the default operator, and it a tiddler doesn’t have spaces in their title then you don’t need to use the square brackets either.
For you can use the list (of titles) of tiddlers stored in a field you can use the enlist operator. if I have understood correctly you would need something like [enlist{!!your_field}] where your_field is the field that stores the list of tiddlers
Or turn it into a macro, even a global macro; \define tiddler-list() $:/core/ui/PageTemplate/topleftbar $:/core/ui/PageTemplate/toprightbar CenterPageStory ..........
Then to use the list in the variable use the enlist-input {{{ [<tiddler-list>enlist-input[]] }}}
Other notes:
I these tiddlers were all ones created by you for the new layout,
Perhaps you should not use the prefix $:/core/ui/PageTemplate/ as this implies your tiddlers are in the $:/core plugin. I may use my “brand” PSaT and use $:/PSaT/centre-story/PageTemplate/… where centre-story is the project name.
You could create your own tag to replace $:/tags/PageTemplate with your own and tag the above tiddlers thus access the list with;
{{{ [all[shadows+tiddlers]tag[$:/tags/PageTemplate]] }}} we used shadows in case you package it in a plugin.
However if all you wanted to do is to replace $:/core/ui/PageTemplate/story with CenterPageStory you could do this by inserting it in the list. I am working through this now but it seems not to be what you need.
[Edited]
Here is an example of replacing one item in a list
Thank you for your suggestions. Unfortunately I’m having a bit of trouble getting any other solution to work other than a list of the tiddlers as the input of the filter. I would like to store the list in a field and use the enlist filter operator.
I’ve tried it on TiddlyWiki.com so I know maybe there’s something influencing the list widget? Attached is a tid of the progress I’ve made so far.
Yes this works perfectly for me. I suppose I was trying to do it just with {{!!list}}, but doing it with {{CenterPageLayout!!list}} seems to work just fine.
It’s weird. It should work the field transclusion without indicate the name of the current tiddler. The transclusion works in the render of the tiddler and preview in edit mode but it doesn’t work in the layout.
The layout is a wiki wide object like the side bar arguably currenttiddler is only within tiddlers in the story or within a list widget unless you set it with the tiddler widget.
So i am not supprised currentTiddler is not set in a layout which does not belong to a single tiddler.
I will try to upload this onto a TiddlyHost site although I must admit the solution is not good enough for general consumption as the fallback on mobile does not work gracefully.
Here’s my current solution although I haven’t really updated it much since making this topic.
Appreciate any feedback if there’s a way to fix it so it works better on mobile. This is why I added the toggle checkbox on the bottom so when I view it on my phone, I can toggle off the custom style so I can use the wiki normally.
The first thing I do in a TW is set fluid story, fixed sidebar - that setup cramps the story and sidebar right against each here. Otherwise my first impression is that it looks good