On Monday, August 19, 2013 4:54:41 PM UTC+3, sklpns wrote: > > Thank you very much Eric > > On Sunday, August 18, 2013 10:16:02 PM UTC+3, Eric Shulman wrote: >> >> On Sunday, August 18, 2013 11:38:04 AM UTC-7, sklpns wrote: >> >>> https://groups.google.com/forum/#!topic/tiddlywiki/GDoMxzof644 >>> is a way to load different stylesheets depending on users browser. >>> Is there a way to do the same thing with different PageTemplate tiddlers? >>> Load different PageTemplates for different browsers/screen resolutions? >>> >> >> yes. The same technique can be used to conditionally apply different >> PageTemplates. >> >> For example, if you have two different layouts, called >> [[BigPageTemplate]] and [[SmallPageTemplate]], you can create a >> systemConfig with logic like this: >> >> if (...detect big page conditions ...) >> config.shadowTiddlers.PageTemplate="[[BigPageTemplate]]"; >> else >> config.shadowTiddlers.PageTemplate="[[SmallPageTemplate]]"; >> >> enjoy, >> -e >> Eric Shulman >> TiddlyTools / ELS Design Studios >> >> HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"... >> http://www.TiddlyTools.com/#Donations >> >> Professional TiddlyWiki Consulting Services... >> Analysis, Design, and Custom Solutions: >> http://www.TiddlyTools.com/#Contact >> >>
Eric, everybody a followup question, if I may the above solution works great, except when ChangeModePlugin is installed. Here's my situation: I have ChangeModePlugin running. When in admin mode the page layout is defined by a tiddler called PageTemplate. It shows a right sidebar with editing options. When in reader mode (initial mode) the page layout is defined by a tiddler called ReaderPageTemplate. The right sidebar contains a blank iframe, where external pages with media players are sent to. In order to try to target smaller mobile devices I'm thinking of a third layout (lets call it HoverPageTemplate) where the media player sidebar will go to the left and the media players, whilst playing, will only show up when user hovers upon an icon. test page: https://dl.dropboxusercontent.com/u/67129323/thetwilightkid-cpt.html so I think the question is: can we use a browser/resolution specific template while maintaining the current ChangeModePlugin configuration for all the other resolutions/browsers? hope this makes sense thanks again sklpns -- 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 post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/groups/opt_out.

