wow, I'm really sorry. If you remove the enclosing [ and ] on the img tag 
code and save it, at least on mine, it displays the tiddler title. So when 
it was a broken img after I added the [ ] on either end I didn't think to 
check to see if it was still working. Sorry about that. Also it seems that 
while I was close, I think, it didn't work out too well.

On Wednesday, June 23, 2021 at 12:24:32 AM UTC-4 cjec...@gmail.com wrote:

> Thanks for the quick reply, and for the code.
>
> Unfortunately, it's not working for me. Here's what I've done.
>
> 1. Download a fresh copy of Tiddlywiki
> 2. Create a tiddler called "Test".
> 3. Copy/paste your code into "Test" and save.
>
> I end up with a broken image icon. When I right click and choose "open 
> image in new tab", I get the link:
>
> http://mysite.com/dir/images/%7B%7B!!title%7D%7D.jpg
>
> It's still interpreting {{!!title}} literally.
>
>  --Nathanael
> On Wednesday, June 23, 2021 at 11:14:15 AM UTC+8 iamdar...@gmail.com 
> wrote:
>
>> I think this is what you're looking for? There may be a better way to do 
>> it, but it seems to function based on my tests. Thanks to everyone over the 
>> last two weeks that have helped me so much! I wouldn't have been able to 
>> answer someone's question like this otherwise.
>>
>> \define linkcreation()
>> [img[images/{{!!title}}.jpg]]
>> \end
>>
>> <<linkcreation>>
>>
>> On Tuesday, June 22, 2021 at 10:45:51 PM UTC-4 cjec...@gmail.com wrote:
>>
>>> Long time lurker, first time poster.
>>>
>>> I've a wiki with a couple of hundred tiddlers all of the same format, 
>>> just different content, so I'm trying to develop a tiddler template.
>>>
>>> Each tiddler displays an image specific to that tiddler. I've a 
>>> directory in which all the images are kept, each with the same name as the 
>>> tiddler {{!!title}} field. E.g.:
>>>
>>> images/Tiddler1.jpg
>>> images/Tiddler2.jpg
>>> images/Tiddler3.jpg
>>>
>>> They idea is to then embed the tiddler title in the url, i.e.:
>>>
>>> [img[images/{{!!title}}.jpg]]
>>>
>>> But of course that just gets read literally. I've also tried using a 
>>> variable with the same result:
>>>
>>> <$set name="image" value="images/{{!!title}}.jpg">
>>> [image[<<image>>]]
>>> </$set>
>>>
>>> How can I do this?
>>>
>>> --Nathanael
>>>
>>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/05540918-c388-4bcf-a2ce-291092690cdcn%40googlegroups.com.

Reply via email to