MODx Snippet, CSS and Yahoo Weather Feed
Tuesday, September 2nd, 2008
I recently created a MODx snippet using a technique described on CSS-Tricks. This little bit of PHP code calls in the Yahoo Weather RSS feed and allows you to generate output that can be styled using CSS and your own icons. You can modify the first line of the snippet below to output weather specific to your zip code.
I first created the snippet ‘Weather’ ( Here is the snippet code.), then simply placed the snippet call on the appropriate page: [!Weather?!]. I then used my CSS document to style the output and created containers that would display the appropriate class ( Here is my CSS document). I created a div tag that carried my icon as a background image. I figured if Yahoo generated a tag that was unaccounted for in my CSS then my scheme would continue to display the appropriate text while leaving the adjacent background image undisplayed (as opposed to the little red Xs if I had used an image tag). Since I am using transparent gifs, I figured no one would be the wiser should this occur. Gif’s were derived from Nordic Weather.
You can see it in action on the Batesville, Arkansas Area Chamber of Commerce website.




































We have recently been going through the development process on one of our larger projects this year and seem to have hit the content delivery wall. As I have finished off the css, graphics, PHP framework, 3-tiered navigation (etc…) I began to look toward content delivery from my client. We have been talking about this for months, have repeatedly gone over how and where to start with the content development and have been following up consistently via telephone, email and in-person meetings. Still, no content.