ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

IF magpie "description" contains "xyz"

June 23, 2007 5:39am

Subscribe [1]
  • #1 / Jun 23, 2007 5:39am

    Ryan 2010

    265 posts

    I am using a weather rss feed with magpie that contains data like this in the description field:

    Variable cloudiness, High 16 °C, Low 9 °C

    Would it be possible to have an if/else statement based on some of the data in the {description} field of magpie?

    Example of what I am trying to achieve:

    if {description} contains “Variable cloudiness”  then show: icon_cloudy.gif

    thanks
    Ryan

  • #2 / Jun 23, 2007 1:28pm

    Lisa Wess

    20502 posts

    There isn’t a check for “contains” in our conditional system, though that’s a great feature request.  However - it is certainly possible to do this with PHP, so hopefully one of our PHP gurus will stop by and help out.

    There also used to be a weather plugin floating around - it may even be in our add-on library, I’m not sure - which might help out with this.

  • #3 / Jun 23, 2007 3:26pm

    Ryan 2010

    265 posts

    thanks,

    it’s probably easy php code, I’ve just never worked with a “something contains” code before

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases