Gossamer Forum
Quote Reply
XML Feed - default
I have the XML Feed plugin set up to display new links. Is it possible for a default message to appear in the feed list if there are no new links?

I've tried adding the code below (in red) but it doesn't seem to work.

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="0.91">
<channel>

<title><%site_title%> Latest Additions</title>
<link><%build_root_url%></link>
<description>Site Description</description>
<language>en-us</language>

<%if link_results_loop~%>
<%loop link_results_loop%>
<item>
<title><%Title%> <%URL%></title>
<link><%config.db_cgi_url%>/jump.cgi?Detailed=<%ID%></link>
</item>
<%endloop%>
<%else%>
No new links added this week.
<%endif%>

</channel>
</rss>

Last edited by:

MJB: May 7, 2010, 8:25 AM
Quote Reply
Re: [MJB] XML Feed - default In reply to
That wouldn't work, as its not valid XML :)

Try:

<item>
<title>No new links</title>
<link><%config.build_root_url%></link>
</item>

..or something like that.

Oh, and it should really be:

<%if link_results_loop.length%>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: May 7, 2010, 9:47 AM
Quote Reply
Re: [Andy] XML Feed - default In reply to
Ah, now I understand how it works. Thanks.