Hi Michael...
To begin with, I can see the benefit of using slices in order to
display a bookmark in an iframe. For one you could later on fetch all
tiddlers tagged "Bookmark" and read their slice values... thus show a
collection or populate a dropdown, etc....
However, you don't need any plugin for something like this! Here's
what you do...
1) Create a tiddler called "Bookmark" containing...
<<tiddler {{
var tid=store.getTiddler('$1');
tid&&tid.tags.contains("Bookmark")?'Bookmark##OUT':'';
}} with: {{
'<<tiddler Bookmark##SHOW with: "'+
store.getTiddlerText('$1::URL')+'" "'+
store.getTiddlerText('$1::Description')+
'">\>';
}}>>/%
!OUT
$1
!SHOW
<html>
<iframe src="$1" title="$2" height="600" width="100%">
</iframe>
</html>{{big{[[go to $2|$1]]}}}
!END%/
2) Right before...
<div class='viewer' macro='view text wikified'></div>
...add the following to your ViewTemplate...
<div macro='tiddler Bookmark with: {{tiddler?tiddler.title:"";}}'></
div>
3) Provide the following slices in any tiddler tagged "Bookmark"
/%
Description:Some Site
URL:http://somesite.com
%/
...et voilà, done!
Note how you can also invoke a bookmark in any tiddler not tagged
Bookmark like so:
<<tiddler Bookmark##SHOW with: "http://somesite.com" "Some Site">>
Enjoy, Tobias.
--
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.