0

I am trying to display a title above an RSS feedblock but sometimes the feed doesn't have any posts in which case i don't want the title displayed.

*|FEEDBLOCK:http://feeds.bbci.co.uk/news/rss.xml|*
    *|IF:FEEDITEMS|*
        <h1>A Lovely Feed Title<h1>
    *|END:IF|*

    *|FEEDITEMS:[$count=10]|*
        <p><strong>*|FEEDITEM:TITLE|*</strong></p>
        <p>*|FEEDITEM:DATE:l  j F|*</p>
        <p>*|FEEDITEM:CONTENT_FULL|*</p>
        <p><a href="*|FEEDITEM:URL|*">Watch on Parliament</a></p>
    *|END:FEEDITEMS|*
*|END:FEEDBLOCK|*

I've tried this and a few other things but alas all have failed me

Tristanisginger
  • 2,181
  • 4
  • 28
  • 41

1 Answers1

0

It's a very horrible hack, but it's not stupid if it works!

*|FEEDBLOCK:http://feeds.bbci.co.uk/news/rss.xml|*
    *|FEEDITEMS:[$count=1]|*
        <h1>A Lovely Feed Title<h1>
    *|END:FEEDITEMS|*
*|END:FEEDBLOCK|*

*|FEEDBLOCK:http://feeds.bbci.co.uk/news/rss.xml|*
    *|FEEDITEMS:[$count=10]|*
        <p><strong>*|FEEDITEM:TITLE|*</strong></p>
        <p>*|FEEDITEM:DATE:l  j F|*</p>
        <p>*|FEEDITEM:CONTENT_FULL|*</p>
        <p><a href="*|FEEDITEM:URL|*">Watch on Parliament</a></p>
    *|END:FEEDITEMS|*
*|END:FEEDBLOCK|*
Tristanisginger
  • 2,181
  • 4
  • 28
  • 41