Rss reader and XSLT formatter of HCMC blog working in Cascade test page
Created a test page which displays titles of 10 most recent Announcements from the blog with a link on each to the posting in the blog.
Remaining issue is how to integrate the XSLT format block used for this with the format blocks used by default so that I can integrate my stuff with existing elements, rather than have to dedicate e.g. the entire related content section of the page to my stuff.
1) Create RSS listener to create XML
Started with http://www.hannonhill.com/kb/XML-Feed-Block/index.html
Selected New/Default/Block, check "Feed", click Submit
Specified parent folder (e.g. Assets/Blocks)
Entered system name and display name (e.g. "BlogRSS")
Entered URL of RSS feed (e.g. http://hcmc.uvic.ca/blogs/inc/CONTROL/hcmc_stats/report.php?standalone=1&chkShowDate=1&chkShowBlog=1&chkShowPost=1&chkShowStatus=1&chkShowMins=1&category_name=Announcements&order_by=post_date_desc&show_rss=1)
Clicked Submit button
2) Create Content block to hold RSS reader block
Copy Assets/Blocks/Template/related-content to Assets/Blocks/Template/related-content-RSS
Edit Assets/Blocks/Template/related-content-RSS set Column block content to RSS Listener block created in step 1
Click submit
3) Create XSL to process XML
Started with instructions at http://www.hannonhill.com/kb/XSLT-Formats/index.html
Selected New/Default/Format, check XSLT, click Submit
Did not select an asset type
Entered XSLT in edit box:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xs" version="2.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:template match="/">
<div>
<h4>Blog Posts</h4>
<p>See <a href="http://hcmc.uvic.ca/blogs">all blog posts</a>.</p>
<ul>
<xsl:for-each select="//item">
<xsl:if test="position() <= 10">
<xsl:variable name="hyperlink"><xsl:value-of select="./link"/></xsl:variable>
<li><class="external" a href="{$hyperlink}"><xsl:value-of select="title"/></a></li>
</xsl:if>
</xsl:for-each>
</ul>
</div>
</xsl:template>
</xsl:stylesheet>
Specified parent folder (e.g. Assets/Blocks)
Clicked Submit button
4) Assemble elements
My test is to put the formatted RSS into the right column
Selected Page (e.g. RSSTEST)
Selected Edit/Outputs
In 02-Related-Content, set Block to Content block containing RSS feed created in step 2
In 02-Related_Content, set Format to XSL block created in step 3
Click Submit