Hi @naris

I want to create a reusable header for my tiddlers that contains a 
> changeable image. I came across transclusion, but I can't figure how to use 
> it with images.
>
> I have no issue displaying an image with an explicit declaration:
> [img[path/to/image.png]]
> <img src="path/to/image.png">
>
> however I'm not having any luck displaying the image with transclusion. 
> Using:
> image: image.png
>
> I get a broken image when I try to use the following:
> [img[path/to/{{!!image}}]]
> <img src="path/to/{{!!image}}">
>
>
Here you could construct the path like the following:

\define construct-path()
[img[path/to/$(image)$]]
\end
<$set name="image" value={{!!image}}>
<<construct-path>>
</$set>

And for the second example

\define construct-path()
<img src="path/to/$(image)$">
\end
<$set name="image" value={{!!image}}>
<<construct-path>>
</$set>
 

> Nothing displays when I use the following:
> [img[path/to/<$transclude field="image"/>]]
>
> And the following just renders it as text (<img src="path/to/image.png">):
> <img src="path/to/<$transclude field="image"/>>
>
> Is what I'm trying to do not possible, or how can I get this to work?
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/87f4da9e-b094-460e-bd94-5ad7daa7233d%40googlegroups.com.

Reply via email to