> I know how to import tiddlers (styles, etc) and tweak things to make
> the mobile version I want...I have no idea how I would do that in one
> TW - are themes easy (*really* easy) to learn? I read the
> documentation for the plug in, but it's talking about things far out
> of my understanding - "slices", etc  I need the TW for Dummies
> version.

Hi Joan,

Here's a basic primer on TiddlyWiki 'themes':
--------------

TiddlyWiki layout is controlled by two types of specially-named
default ("shadow") tiddlers: templates (HTML), and stylesheets (CSS).

There are three shadow templates:
   PageTemplate
   ViewTemplate
   EditTemplate

[[PageTemplate]] defines the overall HTML elements of the entire
document, including the header, message area, main menu, sidebar, and
story column.

[[ViewTemplate]] and [[EditTemplate]] define the HTML elements used to
display individual tiddlers, when being viewed or edited,
respectively.  This includes the tiddler's title, subtitle, toolbar,
tags, etc., as well as rendering wiki-formatted content when viewing a
tiddler, or displaying and processing form input fields when editing a
tiddler.

There are four shadow stylesheets:
   StyleSheetLayout
   StyleSheetColors
   StyleSheetLocale
   StyleSheet

The CSS style rules for standard TiddlyWiki elements are contained in
[[StyleSheetLayout]], [[StyleSheetColors]], and [[StyleSheetLocale]].
To add new style definitions (or override the default styles), you add
your own CSS rules to [[StyleSheet]], which is applied as an overlay
to the default TWCore-defined rules.

A TiddlyWiki *theme* is a special tiddler that you create (it doesn't
have a default shadow definition).  This tiddler contains a "slice
table" -- a two-column table of name/value pairs -- that defines a
specific combination of templates and stylesheet for that theme, like
this:

|PageTemplate| SomeTiddler |
|ViewTemplate| AnotherTiddler |
|EditTemplate| YetAnotherTiddler |
|StyleSheet  | FredsStyles |

To apply a theme, you enter the name of the theme tiddler into a
TWCore text option input field:
   <<option txtTheme>>
or you can 'hard-code' the theme selection, using a tiddler, tagged
with 'systemConfig', containing:
   //{{{
   config.options.txtTheme="nameoftheme";
   //}}}

If you define several different themes, you can quickly switch between
them by using a plugin like:
   http://www.tiddlytools.com/#SwitchThemePlugin
   http://www.tiddlytools.com/#SwitchThemePluginInfo
which looks for tiddlers tagged with "systemTheme", and allows you to
select your desired theme from a droplist, or by clicking on
individual links for each theme.

------------------------

So, for your purposes, you could define TWO themes in ONE document,
one theme for 'normal' viewing, the other for 'mobile' viewing.  Then,
using the plugin mentioned above, you can add the <<switchTheme>>
macro somewhere in your content (perhaps at the top of the MainMenu),
so that your site viewers can quickly select either theme.  Once they
select a theme, it is remembered (using a cookie), so that the same
theme is automatically re-applied each time the visit the page (until
they select another theme, of course).



enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
----------
Was this answer useful? If so, please help support TiddlyTools:

   TiddlyTools direct contributions: (paypal)
      http://www.TiddlyTools.com/#Donate
   UnaMesa tax-deductible contributions:
      http://about.unamesa.org/Participate (paypal)
   TiddlyWiki consulting:
      http://www.TiddlyTools.com/#ELSDesignStudios
      http://www.TiddlyTools.com/#Contact

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to