Thanks Eric --

I tried your technique, but was getting this error in the final transcluded 
tidler:
  
   Error while executing macro <<tiddler>>:
   Unable to evaluate {{tiddler.title}}: TypeError: tiddler is null


The techniques I had been trying up to now have used 

    story.findContainingTiddler(place).getAttribute("tiddler")

So I tried it. This also got an error, but then I read on your web page to 
use place.parentNode.

So I tried this version:

   {{story.findContainingTiddler(place.parentNode).getAttribute("tiddler")}}

like this:

   <div class='tiddler' macro='tiddler ReceiptStuffing with: 
{{story.findContainingTiddler(place.parentNode).getAttribute("tiddler")}}'></div>

And ... this seems to work! Should the simpler {{tiddler.title}} have 
worked?

Thanks!!
Mark

On Thursday, June 13, 2013 4:14:48 PM UTC-8, Eric Shulman wrote:
>
> > It appears what I thought I wanted wasn't what I needed. What I wanted 
> was 
> > a way to evaluate javascript. I want to use the name of the current 
> tiddler 
> > (the one being rendered) to set up and display a PDF (that has the same 
> > name stem as the tiddler). 
>
> In ViewTemplate, write: 
>
> <div class='tiddler' macro='tiddler ShowPDFForTiddler with: 
> {{tiddler.title}}'> 
>
> In ShowPDFForTiddler, write your syntax for showing a PDF (e.g. an 
> iframe), and use $1 in the place where you want the tiddler title to 
> be inserted.  Something like this: 
>
> <html><iframe width="100%" height="640px" src="$1.pdf"></iframe></ 
> html> 
>
> 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 
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to