SaaS CMS has officially launched! Learn more now.

Hampus Persson
Aug 1, 2011
  4344
(0 votes)

Weather Criterion

Apparently British people talk about weather a lot. So wouldn’t it be good to personalise the content based on the weather of the visitor’s location?  Your site visitor had a bad day before visiting your site, and found out that at least it is still sunny outside and he can go to the beach with the family after work Smile

The Custom Criterion uses Google Weather API and expect the user profile to have a ZipCode property. If you are trying it on the Alloy Tech site, set up the workroom component, and locate the file ~/templates/AlloyTech/Units/Placeable/PersonalSettings.ascx. You can easily modify the code to set/get user’s ZipCode information.

A typical zip code in UK, Sweden and USA is such as

  • EC1N 8SS
  • 103 86, Stockholm
  • 60181

Very quick and dirty project as part of my new exposure to EPiServer personalisation. Now you have the source code so let’s see your imaginations!

See the code: Download

.
Aug 01, 2011

Comments

Please login to comment.
Latest blogs
A day in the life of an Optimizely Developer - London Meetup 2024

Hello and welcome to another instalment of A Day In The Life Of An Optimizely Developer. Last night (11th July 2024) I was excited to have attended...

Graham Carr | Jul 16, 2024

Creating Custom Actors for Optimizely Forms

Optimizely Forms is a powerful tool for creating web forms for various purposes such as registrations, job applications, surveys, etc. By default,...

Nahid | Jul 16, 2024

Optimizely SaaS CMS Concepts and Terminologies

Whether you're a new user of Optimizely CMS or a veteran who have been through the evolution of it, the SaaS CMS is bringing some new concepts and...

Patrick Lam | Jul 15, 2024

How to have a link plugin with extra link id attribute in TinyMce

Introduce Optimizely CMS Editing is using TinyMce for editing rich-text content. We need to use this control a lot in CMS site for kind of WYSWYG...

Binh Nguyen Thi | Jul 13, 2024