I have created my own html template and I am playing around with adding 
some stuff that require the use of the template iterator - I asked a 
related but different question about that yesterday.

I just noticed that calling any $month tag before I invoke *#for month in 
year.months* iterator the the *$month* tag get filled as expected.  If  I 
invoke the iterator first then any following *$month* tags are returned as 
empty or N/A.

Example

                  <table class="bordered">
                    <tbody>
                      <tr><td>Avg Temp This 
Month:</td><td>$month.outTemp.avg</td></tr>
                      #for $month in $year.months
                        #if $month.outTemp.count.raw
                            <tr><td>$month.dateTime.format("%Y 
%m")</td><td>$month.outTemp.avg</td></tr>
                        #end if
                      #end for
                    </tbody>
                  </table>

Produces the following output

<https://lh3.googleusercontent.com/-hprKPBNzNNc/Wp2jID9K34I/AAAAAAABHlU/HEKRV-ZLMKov2Z_4hDYkLwQNXL8vbJ6LQCLcBGAs/s1600/Capture1.JPG>

If I change it to 
                  <table class="bordered">
                    <tbody>
                      <tr><td>Avg Temp This 
Month:</td><td>$month.outTemp.avg</td></tr>
                      #for $month in $year.months
                        #if $month.outTemp.count.raw
                            <tr><td>$month.dateTime.format("%Y 
%m")</td><td>$month.outTemp.avg</td></tr>
                        #end if
                      #end for
                      <tr><td>Avg Temp This 
Month:</td><td>$month.outTemp.avg</td></tr>
                    </tbody>
                  </table>

I get the following result

<https://lh3.googleusercontent.com/-RzdycO23iN4/Wp2kBz5ax2I/AAAAAAABHlc/tWGKE2Zam68Pqk4vhoyh8RzdAB_BeHh6ACLcBGAs/s1600/Capture2.JPG>

Is this a bug, a feature or something else?

Thanks in advance

Louis


-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to