The macro could have TiddlerTag as an option - thus: <<tiddler ShowPopup with: TiddlerName TiddlerTag label tooltip buttonClass width popupClass>>
ALex 2009/8/26 Alex Hough <[email protected]> > "That should do it! If you get stuck, let me know..." - Eric Shulman > > Hi Eric! > > Often help is needed in the editTempate at the stage when a tiddler is > being produced with specific tags from a custom newTiddler macro. > > A tiddler produced with a <<newTiddler tag:'foo'>> might need help specific > for that class of tiddler. > > For example: I am producing tiddlywiki to collect a set of anti-patterns of > organisational behavior for a group of users. I would like them to write > each tiddler in a specific format using sections. There are other classes of > tiddler apart from 'anti-paterns' , 'context sensitive help' is might be > required for each tag. > > The 'context senitive with fallback' is working well. > > Skye, asked "is it possible use tiddler.tags instead of tiddler.title in > this code" : I think that it would be really useful. > > It is possible to adapt the html tweek method for 'context sensitive help > with fallback'? > > > ALex > > > > 2009/8/26 Alex Hough <[email protected]> > > 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 >> >> > > > -- > http://www.multiurl.com/g/64 > > -- 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 -~----------~----~----~----~------~----~------~--~---

