Of course I'd screw up the answer....
this works....(not real sure why but it does.)
<img src="weather/moon/${almanac.moonphase}.jpg"/>
results in:
<img src="weather/moon/Waning gibbous.jpg"/>
Den
On 6/24/2024 5:30 PM, 'W2DEN' via weewx-user wrote:
I found the answer, embed the variable in braces{}
<img src="weather/moon/{$almanac.moonphase}.jpg"/>
It is more of an HTML solution than anything else.
Den
On 6/24/2024 3:14 PM, 'Den' via weewx-user wrote:
I have named moon phase .jpg images in the folder weather/moon that
match the $almanac.moonphase names.
I am trying to display the image based on the $ variable. Here is the
html in the tmpl file:
<img src="weather/moon/ $almanac.moonphase.jpg">
I have tried all kinds of spaces, quotes, single quotes ... without
getting the image to display.
For example:
<img src="weather/moon/" $almanac.moonphase".jpg">
If I enter the line without the $ variable it works:
<img src="weather/moon/Waning gibbous.jpg">
Thanks for reading this and hopefully filling me in with the answer.
Den
--
You received this message because you are subscribed to a topic in
the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/weewx-user/E_PBXItrogc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/6098a4c6-e8db-4636-89c5-11fc2de9833en%40googlegroups.com
<https://groups.google.com/d/msgid/weewx-user/6098a4c6-e8db-4636-89c5-11fc2de9833en%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to a topic in the
Google Groups "weewx-user" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/weewx-user/E_PBXItrogc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/e8af3ef9-cb4c-4f11-9e0e-be6dba3ad4ce%40yahoo.com
<https://groups.google.com/d/msgid/weewx-user/e8af3ef9-cb4c-4f11-9e0e-be6dba3ad4ce%40yahoo.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/2e53b1c8-3bf4-4c94-bffc-a47f22b2b4f6%40yahoo.com.