Hi Charlie, love the concept and very impressiv what you managed to put together, thank you for sharing.
If you don't mind asking, is there a specific reason for placing the decision for what to transclude in the two templates themselves and always calling both of them? Personally I would have put the decision in the root tiddler - e.g. TiddlyWiki Title - via a match filter and only called what was needed, so I wonder if there is something I am missing/not thinking about or if it is just another case of multiple ways to achieve the same result. Oh and one thing I noticed, just as an info: Since getstartupcontext is a javascript macro you don't actually need to import it. Unlike normal macros javascript macros are always global. Kind Regards, Felicia On Wednesday, 9 September 2020 23:58:14 UTC+2, Charlie Veniot wrote: > > G'day all, > > I'm still in the midst of setting up my "Products Review" TiddlyWiki to > also behave as a "Urban Off-Gridding for Laypersons" TiddlyWiki. > > Both contexts have much in common (from structural elements to content), > and I really did not want to create two distinct TiddlyWikis with a ton of > duplication between them. > > Hence the desire to have one TiddlyWiki with two "contextual" appearances. > > Before getting into show and tell images (further below), here are the two > links that open the same TiddlyWiki file but trigger different "contextual" > appearances upon startup: > > - > https://intertwingularityslicendice.neocities.org/CJ_ProductReviews.html > *?context=ProductReviews* > > <https://intertwingularityslicendice.neocities.org/CJ_ProductReviews.html?context=ProductReviews> > - > https://intertwingularityslicendice.neocities.org/CJ_ProductReviews.html > *?context=OffGridding* > > <https://intertwingularityslicendice.neocities.org/CJ_ProductReviews.html?context=OffGridding> > > For the moment, only Title and Subtitle change based on context. Next: I > will start modifying other content to change based on context. > > Cheers ! > > Further below, you'll find images of the various tiddlers *(which I plan > to tidy-up later)* that make all of this work, including: > > - *GetStartupContext.js* > - (javascript macro to retrieve the startup context, i.e. "Products > Review" or "...Off-Gridding...) > - Built with help from Stephan Hradek's Javascript Macros in > WikiText > <http://tw5magick.tiddlyspot.com/#Javascript%20Macros%20in%20WikiText> > and by grabbing bits of Javascript from various sites on the web > - *Although I am a software developer, I am neither proficient > with nor a fan of javascript!* > - *Set Startup Context* > - (a "Startup Actions" tiddler) > - *Alternate TiddlyWiki Purposes* > - (a tiddler to store the startup context upon startup, and to > provide an interface, i.e. radio buttons, to dynamically switch context > at > any time) > - The *context-switching interface* (i.e. the radio buttons) as they > appear in the sidebar > - *SideBar example of content changing* (the title and subtitle of the > TiddlyWiki) upon context change > - The *setup of Title and Subtitle in the Control Panel* > - The four *Title-related Tiddlers* > - The three *Subtitle-related Tiddlers* > - The *two template tiddlers* (tPr and tOg) that help decide which > content to show based on current context > > > > [image: GetStartupContextMacro.png] > > > [image: SetupStartupContext.png] > > > [image: AlternateTiddlyWikiPurposesTiddler.png] > > > [image: ContextSwitchingInterface.png] > > > [image: SideBarChangesWithContext.png] > > > [image: ControlPanelSetupTitleAndSubtitle.png] > > > [image: TiddlyWikiTitleTiddlers.png] > > > [image: TheOtherTwoTitleTiddlers.png] > > > [image: FancySubtitleMain.png] > > > [image: OtherSubtitleTiddlers.png] > > > [image: TemplateTiddlersForContextualContent.png] > > > > > > > > > > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/863b09f1-20bf-4552-b6d4-29ff541a74dbo%40googlegroups.com.

