Thanks Eric.

You have solved the problem and anticipated any further requirements I was
thinking about.

I am exploring Pattern languages using a TW (thanks to FND's delicious
links, and Mr Mahoff's enthusiasm.) I aim to clarify the presentation of the
ideas using patterns in the context of the text and the TW inwhich it is
embeded

I thought that help might be useful in the toolbar.

Alex

2009/8/26 Eric Shulman <[email protected]>

>
> > A 'Help Popup'  or  link to a "help tiddler' from the toolbar might be a
> > good way to display the help while they are editing their tiddlers.
>
> To add a custom *popup* to the toolbar, you can use
>   http://www.TiddlyTools.com/#ShowPopup
>
> This little tiddler isn't a plugin, and it isn't an inline script
> either... it's just a bit of 'pure' HTML that renders a link with an
> 'onclick' handler that fires up a TW popup and fills it with content
> from a specified tiddler.  You use it by embedding in in another
> tiddler, passing 'substitution parameters' via the <<tiddler>> macro
> syntax, like this:
>
> <<tiddler ShowPopup with: TiddlerName label tooltip class width
> popupclass>>
> (see ShowPopup tiddler for more details)
>
> For your purposes, you want to add the popup link directly into the
> ViewTemplate, so that it will appear in all tiddlers automatically,
> without having to embed the above macro into each one individually.
> To do this, edit the ViewTemplate and locate this line:
>
> <div class='toolbar' macro='toolbar
> [[ToolbarCommands::ViewToolbar]]'></div>
>
> and replace it with:
>
> <div class='toolbar'>
> <span macro='tiddler ShowPopup with:
>      Help help "show help" button'></span>
> <span macro='toolbar [[ToolbarCommands::ViewToolbar]]'></span>
> </div>
>
> Note: if you want to implement 'context sensitive' help for each
> tiddler, you could tweak the above to use a 'computed parameter' for
> the TiddlerName, by writing:
>
> <span macro='tiddler ShowPopup with:
>   {{tiddler.title+"Help"}} help "show help" button'></span>
>
> Then, for each tiddler in the document, create a second tiddler with
> an added "Help" suffix, so that when the 'help' link is clicked in
> tiddler [[SomeTitle]], the popup will automatically display content
> from the corresponding [[SomeTitleHelp]] tiddler.
>
> Of course, this would mean having twice as many tiddlers in the
> document, so that each one would have a matching [[...Help]] tiddler
> (and don't even get started about SomeTitleHelpHelp, etc.).  Here's a
> further refinement that adds fallback handling for a document-wide
> generic [[Help]] tiddler if a corresponding context-sensitive
> [[...Help]] tiddler does not exist:
>
> <span macro='tiddler ShowPopup with:
>   {{ (tiddler&&store.tiddlerExists(tiddler.title+"Help")?
> tiddler.title:"")+"Help"; }}
>   help "show help" button'></span>
>
> That should do it!  If you get stuck, let me know...
>
> enjoy,
> -e
>
> >
>


-- 
http://www.multiurl.com/g/64

--~--~---------~--~----~------------~-------~--~----~
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