including system-regions in other system-region's xslt
can i include a block and xslt format in another system-region? i'm using an xslt to style my main content in a page and want to include an rss feed block within that content
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ryan Griffith on 22 Aug, 2012 02:49 PM
Hi fuelishways,
Just to clarify, you have a Feed Block and would like to include the contents of that block inside of the Region that is designated for your Page's main content?
2 Posted by fuelishways on 22 Aug, 2012 02:52 PM
Yes, correct
3 Posted by Ryan Griffith on 22 Aug, 2012 03:25 PM
It is possible to get the contents of the block by using a Block Chooser in your Page's Data Definition. You must also be sure to set the render-content-depth option for this field to a value of 4 or 5 to make sure all of the content is included.
Once the block has been added to the Page, you can then access it's contents within your XSLT Format just as you would any other content. For example
<xsl:apply-templates select="//item"/>
will call an item template for each item present in the Feed Block.Please let us know if you have any questions.
Thanks.
4 Posted by fuelishways on 22 Aug, 2012 04:40 PM
what is your recommendation for incorporating a feed into a web page? if i use the block thing and an xslt format, then i'll have to set up a publish to automatically happen every day correct? otherwise, the feed will be out of date?
5 Posted by Ryan Griffith on 22 Aug, 2012 05:44 PM
You are correct, going this route creates static content on the published page. So you would have to regularly publish the page, either manually or using a scheduled Publish Set or Site Publish.
I think it depends on your preference. The easiest route would probably be using Feed Block and Format in conjunction with a schedule publish. Otherwise, you would need to add some sort of dynamic element on the page using an external script that parses the feed. This could be PHP, JavaScript, ASP.NET, etc.
fuelishways closed this discussion on 23 Aug, 2012 07:14 PM.