Custom Weather Layout Template

  • 1
  • Question
  • Updated 4 years ago
  • Answered
Is it possible to get the current XML layout used for the Weather Gadget?

While I am able to take something already created and modify it, I am unable to code it from scratch. I have read through your 'Creating custom Gadget Settings 1-6' but it's over my head.

I just want to change layout and use some custom CSS and images.

Any possibility of this, or anybody care to share their custom layout XML?
Photo of Eric S.

Eric S.

  • 7,412 Points 5k badge 2x thumb
  • hopeful

Posted 6 years ago

  • 1
Photo of Neal

Neal

  • 61,252 Points 50k badge 2x thumb
You can find the links to the xml and css files here.

You'll need to take and update the overall Weather Gadget with the links to the updated files you create.

Thanks.
Photo of Eric S.

Eric S.

  • 7,412 Points 5k badge 2x thumb
Awesome! Exactly what I was looking for, thanks!
Photo of Eric S.

Eric S.

  • 7,412 Points 5k badge 2x thumb
It seems the layouts are no longer in XML and are now HTML files hosted at GitHub?

All I did was remove the Div and Span for 'City', but now the Weather Widget doesn't work at all. Nothing shows up, no errors or anything. Hosting the HTML file in Storage.

Have tried with and without the <script> at the bottom of the file as well.

Am I missing a step here?
Photo of Neal

Neal

  • 61,252 Points 50k badge 2x thumb
The old Gadget used the XML files for the layout.  The Widget uses HTML files instead.

If you put the div back in with the span for City, does the layout then work?  When you say there are no errors, have you gone into the Developer's tools (press F12) and gone to the console tab to review the messages there?

Thanks.
Photo of Eric S.

Eric S.

  • 7,412 Points 5k badge 2x thumb
It was the JS file not loading correctly. Thanks Neal!
Photo of Neal

Neal

  • 61,252 Points 50k badge 2x thumb
Good to hear you found the problem.