
Weather
Fetch function for eZ publish which gives possibility to fetch weather information from weather.yahoo.com base on XML content. It takes 2 parameters, "location_code" which you can check on weather.yahoo.com pages for your region (part of URL) and "unit" which is f or c (temperature unit).
1. Put weather extension in to your eZ publish extension directory.
2. Enable extension in Admin interface. Setup->Extensions
Example template code:
{def $forecast=fetch( 'weather', 'forecast', hash( 'location_code', 'PLXX0010', 'unit', 'c' ) )}
Current conditions:<br />
{$forecast.image}<br />
{$forecast.condition.text}<br />
{$forecast.condition.temp}<br />
{$forecast.condition.date}
{* List available content *}
{$forecast|attribute( show )}
Whish you always nice weather ;)
weather.tar.gz (1.06 kB)




