Chrlie,

Thanks for sharing this code pattern.

I suggest loading it with more information on why this is a compelling 
"code pattern" and the demo links before you start documenting/posting how 
it is achieved. 

This allows people to comment on your concept, because once the details are 
there they may feel they should not comment until they work through the 
whole solution or code pattern.

I am hoping to help you get more engagement from the community on your 
interesting developments. You can of course use reply to post the code 
details right after the initial post.

Just a suggestion, do as you please.

Regards
Tones


On Thursday, 10 September 2020 07:58:14 UTC+10, 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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0aeab6d8-43ea-439b-a67a-6eaa6e72eb75o%40googlegroups.com.

Reply via email to