I should add that the almanac setup is working fine otherwise.  If I do 
something like $almanac.jupiter.rise, I get the data as expected.  I just 
wanted to keep my post concise :)

On Sunday, November 22, 2020 at 11:23:02 AM UTC-5 Jared wrote:

>
> 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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/103a4b70-a4a2-4415-b966-e0d106a1ffd3n%40googlegroups.com.

Reply via email to