Getting CSS to work with RSS feed

27 views
Skip to first unread message

Merrill Webmaster

unread,
Jun 13, 2011, 4:34:56 PM6/13/11
to RedDot CMS Users
Hi all,

First time using this forum. I am currently using CMS 10.0 and
LiveServer 4. I got my RSS feed up and running, but I can't seem to
get the CSS to work on it. Here is the code for RSS feed page:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet type="text/css" href="<%anc_rss_css%>" ?>
<?xml-stylesheet type="text/xsl" href="<%anc_rss_xsl%>" ?>
<rss version="2.0">
<channel>
<!IoRangePreExecute>
<title><%stf_pageTitle%></title>
<description><%stf_rssDescription%></description>
<link><%stf_siteURL%></link>
<pubDate><%inf_Date%></pubDate>
<language>en-us</language>
<!IoRangeList>
<item>
<title><%hdl_pageTitle%></title>
<link><%lst_Full_File%></link>
<pubDate><%inf_Date%></pubDate>
<guid><%lst_Full_File%></guid>
<description><%txt_summary_rss%></description>
<!-- <description><%txt_mainContent%></description> -->
</item>
<!/IoRangeList>
<!/IoRangePreExecute>
</channel>
</rss>

Has anyone tried to setup a RSS with CSS or XSLT?

Thanks!

Jason

kimdezen

unread,
Jun 13, 2011, 8:15:08 PM6/13/11
to RedDot CMS Users
Hey Jason,

Can you elaborate a little further and explain what you mean by not
being able to get the CSS to work?? Is the stylesheet being published
by the CMS? Is the link to the stylesheet in the feed page being
displayed or is it blank?

Cheers,
Kim

Mark Radford

unread,
Jun 14, 2011, 11:15:14 AM6/14/11
to RedDot CMS Users
Hi Jason,

I've managed to get XSLT working on an RSS feed once, but it was quite
a while ago. A few things to bear in mind:

It only worked in IE6 (looks like a lot of newer browsers don't allow
XSLT transforms on XML files). Also it didn't work in RedDot (I never
quite got to the bottom of that to be honest), only on the published
site.

You can see an example of the feed here:
http://www.qcda.gov.uk/rss/202.xml (linked to from http://www.qcda.gov.uk/about/98.aspx).

Mark

Tim D

unread,
Jun 15, 2011, 5:06:26 PM6/15/11
to reddot-c...@googlegroups.com
I believe this may be a fairly common reported issues in projects with CSS and JS in SmartEdit or preview if they are created as pages. This is because the pages are rendered by ASP or ASPX pages and typically have. If you can link it as an asset. If not I can't think of a work around for MS v10 at this time.  Older versions you could append &script=1 in smartedit blocks.

If it is not working on the published side from Delivery Server (FKA LiveServer) you can set your HTTP headers in some versions of Delivery Server. I believe that the header was an option in v4 but don't quote me on that.

General setting headers sample you can try

<rde-dm:attribute mode="write" attribute="request:rdeResponseMimetype" op="set" value="text/css"/>
<rde-dm:attribute mode="write" attribute="response:Expires" op="set" value="[##].getDateHeaderValue(1440)"/>
<rde-dm:attribute mode="write" attribute="response:Date" op="set" value="[##].getDateHeaderValue(0)"/>
<rde-dm:attribute mode="write" attribute="response:Pragma" op="set" value=""/>
<rde-dm:attribute mode="write" attribute="response:Cache-Control" op="set" value=""/>


Always make sure it works if you are doing it from the file system to check browsers like Mark suggested.

Merrill Webmaster

unread,
Jun 14, 2011, 12:49:06 PM6/14/11
to RedDot CMS Users
Hi Kim,

I have publish the CSS and it is referencing correctly on the
LiveServer. I have made some simple css changes like increase the
font size or font colors, but the rss feed page is not reflecting
those changes.

Here are some of the css code that I setup:

rss {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:18px;
line-height:130%;
}
/* HEADER */
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
rss channel title{
color:#00ff00;
border-bottom:1px solid black;
font-weight:bold;
font-size:24px;
font-size:140%;
background-color:#4483C7;
}
rss channel description {
float:left;
font-size:130%;
font-weight:bold;
}

Nothing above is displaying any changes. I notice that even the
Preview in the CMS these changes are not taking effect. It might be
a simple reference issue here. Not sure.

Thanks!

Jason
> > Jason- Hide quoted text -
>
> - Show quoted text -

Jian Huang

unread,
Jun 27, 2011, 6:17:12 PM6/27/11
to RedDot CMS Users
Hi Jason,

Have you tried Tim D's suggestions?

Does the CSS in RSS display correctly when implemented on a local file
system (with MS and DS)?

-Jian
Reply all
Reply to author
Forward
0 new messages