Plugin Method showRSS()

public function showRSS() {
    //...your PHP code...//


Provides you with the means to write RSS for your Plugin.

Where You Can Use It

In your pluggable modules, from Zenario 7.0 onwards.


Your showRSS() method should output XML to the screen.

Before you can write your showRSS() method, you must set up an RSS link on the page using the addToPageHead() method.

Note: The CMS will send the appropriate XML header() command for you automatically.

Return Value

No return value is needed.


public function showRSS() {
    echo '
<?xml version="1.0" encoding="UTF-8" ?>
    <rss version="2.0">
            <title>', $this->title, '</title>
            <link>', $this->linkToItem($this->cID, $this->cType, true), '</link>

    foreach($this->items as $item) {
        echo '
                    <title>', $item->title, '</title>
                    <description>', $item->description, '</description>
                    <link>', $this->linkToItem($this->cID, $this->cType, true), '</link>
                    <pubDate>', $item->date, '</pubDate>

    echo '

This example can be used in conjunction with the addToPageHead() method to show an RSS link.


You can use the Framework system to store your XML schema, rather than hard-coding it into your PHP code.