Hi,
I'm trying to create a table of celestial objects with almanac data. I
want to use a for loop to create the table based on an array of chosen
objects, but it doesn't like how I'm using the tags for some reason.
As an example, I have the following in my template:
#set planets = ['Mercury', 'Venus', 'Mars']
#for planet in planets
<tr>
<td class="celestialTableObject">$planet</td>
<td class="celestialTableData">$almanac.$planet.rise</td>
<td class="celestialTableData">$almanac.$planet.transit</td>
<td class="celestialTableData">$almanac.$planet.set</td>
<td class="celestialTableData">$almanac.$planet.az</td>
<td class="celestialTableData">$almanac.$planet.alt</td>
<td class="celestialTableData">$almanac.$planet.ra</td>
<td class="celestialTableData">$almanac.$planet.dec</td>
<td class="celestialTableData">$almanac.$planet.mag</td>
</tr>
#end for
The table prints the planet name as expected, but all the data cells are
printing with .$planet.rise .$planet.set and so on.
How can I get the CheetahGenerator to use both tags?
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/05f369da-a262-4913-aeed-0f74698db33bn%40googlegroups.com.