2017 © Pedro Peláez
 

october-plugin weather-plugin

Weather plugin for October CMS

image

rainlab/weather-plugin

Weather plugin for October CMS

  • Saturday, July 16, 2016
  • by october
  • Repository
  • 4 Watchers
  • 3 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 17 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Weather plugin

The plugin was created for the php[tek] 2014 conference., (*1)

The weather information is loaded from Open Weather Map. For the simplicity the country list in the Inspector dropdown menu is limited with United States, Canada and Australia, but if you edit the component definition in the page code manually you can set any country and state., (*2)

The plugin defines the Weather component that have four properties:, (*3)

  • country - two-letter country code, the default value us "us"
  • state - two-letter state code, the default value us "dc"
  • city - city name, the default value is "Washington"
  • units - units for the temperature and wind speed, possible values are "metric" and "imperial", the default value is "imperial".

To use the component, drop it on a page and use the {% component 'weather' %} tag anywhere in the page code to render it. Note that the component injects a CSS file reference to a page to style the widget. It's optional. If you want to use it, use the {% styles %} tag in the HEAD section. The next example shows a simplest page code that uses the weather component:, (*4)

title = "Weather"
url = "/weather"

[weather]
units = "metric"
==
<!DOCTYPE html>
<html>
    <head>
        <title>Weather component example</title>
        {% styles %}
    </head>
    <body>
        {% component 'weather' %}
    </body>
</html>

back-end preview, (*5)

The Versions

16/07 2016

dev-master

9999999-dev https://octobercms.com

Weather plugin for October CMS

  Sources   Download

MIT

The Requires

 

by Samuel Georges
by Alexey Bobkov

blog october weather octobercms