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.

Custom field in RSS feed

October 29, 2008 4:43pm

Subscribe [1]
  • #1 / Oct 29, 2008 4:43pm

    grizzlies

    27 posts

    One of my custom fields is an url, and I’m trying to show the link on my RSS template based on a conditional. 

    Here’s the piece:

    <description>{exp:xml_encode}{cal-event-date format="%n/%j, %g:%i%a"}{/exp:xml_encode}{if cal-home-away=="Home"}{exp:xml_encode}<a href="http://{exp:xml_encode}{cal-game-tix}{/exp:xml_encode}">Tickets</a>{/exp:xml_encode}{/if}</description>

    I found a few discussions about this but nothing that I’ve been able to use to solve my problem.

  • #2 / Oct 31, 2008 12:47pm

    grizzlies

    27 posts

    Checking the feed in browser gives me zilch.  When I view source however, I see content, although without the hyperlink I’m looking for.  The conditional seems to be the problem.

    I’ve read that the conditional needs to be outside {exp:xml_encode}.  But it isn’t working for me.

    Any help is appreciated (trying to do the launch today).

  • #3 / Oct 31, 2008 12:58pm

    grizzlies

    27 posts

    A little more info.

    Using this:

    <description>{cal-event-date format="%n/%j, %g:%i%a"} {if cal-home-away=="Home"}<a href="http://{exp:xml_encode}{cal-game-tix}{/exp:xml_encode}">Tickets</a>{/if}</description>

    Gives me what I want when I view source…

    <description>11/3, 7:00pm <a href="http://www.ticketmaster.com/cgi/outsider.plx?CAMEFROM=NBAGRIZZLIES_CAL&GOTO=http://www.ticketmaster.com/event/1B00413ECAF952A0?artistid=806038&brand=grizzlies">Tickets</a></description>

    But it isn’t showing up in the feed in the browser window, the hyperlinks don’t appear.

    Does the <description> strip out hyperlinks?

  • #4 / Oct 31, 2008 1:03pm

    grizzlies

    27 posts

    In fact, there are other odd differences between what I’m seeing in the browser and what the RSS code looks like.

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

ExpressionEngine News!

#eecms, #events, #releases