On Thursday, November 24, 2016 at 9:24:59 AM UTC-5, Dan'l B wrote:
>
> OK, all running in default mode. Now, in the skin.conf file, I am having
> trouble understanding how to enable the various options. For example, if I
> want to show_wind on the forecast page,
>
> ## Which columns should be displayed?
>
> .....
>
> #set $show_wind = int($getVar('Extras.forecast_table_settings.show_wind',
>> 1))
>
>
> I uncomment that line, but then do I also uncomment the IF loops (#if
> $varExists('forecast')) as well as the IF condition:
>
> #if $show_wind
>
> <td class='col-wind' style='text-align:center'><img
>> src='icons/flag.png' class='legend-img' alt='W' title='wind' /><br/><span
>> class='units'>$unit.label.wind</span></td>
>
> #end if
>
>
> or have I misunderstood this process?
>
dan'l,
in cheetah syntax, the # indicates a directive, and ## indicates a
comment. so
#set $x = 1
will set the value of variable $x to 1. and this would comment that line:
##set $x = 1
the line:
#set $show_wind = int($getVar('Extras.forecast_table_settings.show_wind',
1))
is a bit of cheetah/python magic. it says that the variable $show_wind
should be set to whatever $Extras.forecast_table_settings.show_wind is set
to, but if that variable does not exist, use the value 1. the variable
$Extras.forecast_table_settings.show_wind is set like this in skin.conf:
[Extras]
[[forecast_table_settings]]
show_wind = 1
or like this in weewx.conf:
[StdReport]
[[forecast]]
[[[Extras]]]
[[[[forecast_table_settings]]]]
show_wind = 1
hope that helps!
m
--
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.