Customize SharePoint RSS (feed. aspx) and

Source: Internet
Author: User
Tags cdata xsl xsl file

You should know that CBQ (content by query) supports RSS. You only need to set the attribute to enable it. After enabling it,/_ layouts/feed. aspx is used by default,

It has three parameters. Normally, the format is as follows: http: // *****/_ layouts/feed. aspx? XSL = 1 & Web = & page = & Wp =

One parameter that needs to be emphasized here is XSL, Which is configured in Web. config. feedxsl is the default prefix. You can configure a feed1_wokao, and the parameter becomes XSL = wokao.

At the same time, there is another important configuration section. As for what it means, you can see it at a glance.

<Deleetask>
<Add key = "feedcachetime" value = "300"/>
<Add key = "feedpageurl" value = "/_ layouts/feed. aspx? "/>
<Add key = "feed1_1" value = "/Style Library/XSL style sheets/cbqrss. XSL"/>

</Appsettings>

Now you know that the key is to modify the XSL file. That's exactly what it means.

The RSS format should also be mentioned here. Note that there are only a few nodes in the standard item, so what should we do if we need more information? Here you can refer to how the RSS of the Sharepoint list is made

Http: // ***/_ layouts/listfeed. aspx? List =,

<RSS version = "x.0">
<Channel>
<Title> </title>
<Link> </link>
<Description> </description>
<TTL> </TTL>
<Item>
<Title> </title>
<Link> </link>
<Description> </description>
<Pubdate> </pubdate>
</Item>
<Channel>
<RSS>

Below is a Sharepoint list RSS, and click a clip of view source. That's right. The description is abnormal. OK, our focus is on <! [CDATA [This is a thing, so it's almost done. How can we accomplish this purpose?

<Item>
<Title> blblala </title>
<Link> *******/dispform. aspx? Id = 6606 </link>
<Description> <! [CDATA [<div> <B> Short Description: </B> DSD </div>
<Div> <B> richhtmlfield: </B> <Div class = "externalclass5153f3f904c748019e96afd756d38afe"> <p> </P>
<Table width = "100%" class = "MS-rtetable-Default" cellspacing = "0" style = "font-size: 1em "> <tbody> <tr class =" MS-rtetableheaderrow-Default "> <TH class =" MS-rtetableheaderfirstcol-Default "rowspan =" 1 "colspan =" 1 "> DSDs </Th>
<TH class = "MS-rtetableheaderoddcol-Default" rowspan = "1" colspan = "1"> DS </Th> </tr>
<Tr class = "MS-rtetableoddrow-Default"> <TH class = "MS-rtetablefirstcol-Default" rowspan = "1" colspan = "1"> DS </Th>
<TD class = "MS-rtetableoddcol-Default"> DS </TD> </tr> </tbody> </table>
<p> </P> </div>
]> </Description>
<Author> </author>
<Pubdate> wed, 20 Sep 2006 22:28:51 GMT </pubdate>
<Guid ispermalink = "true"> </GUID>
</Item>

Use the following

<XSL: Text disable-output-escaping = "yes"> & lt ;! [CDATA [</XSL: Text>
<XSL: value-of select = "$ anyvarible"/> anyhtmlcode
<XSL: Text disable-output-escaping = "yes">] & gt; </XSL: Text>

Then you can do whatever you want.

Of course, this is only the simplest solution.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.