Hi,
I’m trying to replace a fixed path value by a transclusion with the help of the LetWidget.
PerplexityPro says, the code will be running, but it is not:
\define imagew(imgtitle,width)
<$let imgfolder="twImages/{{$:/SiteTitle}}">
<a href=<<imgfolder>>/$imgtitle$ title="Click to open image in a new tab" target="_blank">
<img src=<<imgfolder>>/$imgtitle$ width="$width$" height=""/>
</a>
</$let>
\end
The former version of the macro using a fixed path is working well:
\define imagew(imgtitle,width,folder:"twImages\MyWiki")
<a href="$folder$/$imgtitle$" title="Click to open image in a new tab " target="_blank">
<img src="$folder$/$imgtitle$" width="$width$" height=""/>
</a>
\end
Version: TW v5.3.5
I appreciate ideas how to improve the code