Template coding - help appreciated

56 views
Skip to first unread message

Copain

unread,
Dec 3, 2022, 10:06:00 AM12/3/22
to weewx-user
I have probably a beginners question, which however I can't resolve.

Bootstrap skin has skin.conf in directory /Bootstrap and uses for its images a separate skin.conf in /Images.

Now, I am trying to parse [ImageGenerator] [[week_images]] in /Images/skin.conf to find the image names with the following code:

  #set $count = 0
  #set $size = len($ImageGenerator.week_images)
  #for $image in $ImageGenerator.week_images
      #if $count % 2 == 0
          <div class="row mb-1">
      #end if
          <div class="col-md-6 d-flex justify-content-center">
              <a href="big_images/${image}.png" data-toggle="lightbox">
                  <img src="images/${image}.png" alt="" class="img-responsive" style="max-width:100%;">
              </a>
          </div>
      #if $count % 2 == 1 or $count == ($size - 1)
          </div>
      #end if
      #set $count = $count + 1
  #end for

The code should work, except that it can't find 'ImageGenerator'.

How can I get it to work?

Appreciate any help, thank you.

michael.k...@gmx.at

unread,
Feb 10, 2023, 1:27:07 PM2/10/23
to weewx-user
Which version are you using? The current version has evolved very much and you don't need to specifiy any week images any more, they are computed from the /Images/skin.conf configurations automatically.

Consider upgrading to the latest version of the skin.

Reply all
Reply to author
Forward
0 new messages