Syndication

Syndication

The XML/RSS module is located under the "Admin" tab in the client console. This module allows administrators to create RSS and Atom feeds, as well as populate XML files with data from CentralPoint modules. The module allows administrators to create filtered results from one module at a time.

RSS and Atom feeds are typically used to allow site visitors easy access to updated content. CentralPoint's RSS feeds follow the World Wide Web consortium's (W3C) RSS 2.0 standard. The Atom feeds meet the 2005 W3C Atom standard.

XML files can be used for a number of applications, such as producing files that can be shared across multiple database platforms. Regardless the application, the XML file meets the W3C standard for XML schemas.

Chapters

Choosing your content and module Formatting your feed Placing/linking your feed on the web site

Choosing your content and module

To create an XML/RSS record, locate the module in the Admin tab in your client console. Click the "New" button.

The module features two tabs -- Details tab, which defines what content you'll display from which module; and the Formatting tab, which determines which fields from within your module you will display.

The Details tab contains the following fields: Title, Systen Name, Publish Start Date, Publish End Date, Cache Duration, Add This RSS Script, Module, Record Count, Filter Type, Taxonomy, Archive Type, Audience Filter, Role Filter, Skip Count, Record Order, Predefinied Order/Custom Order, Audiences and Display Status.

The "Title" field governs the feed name both within the console and on the front end of the web site. Name this accordingly so that your users know what feed they are viewing.

The Systen Name field is automatically populated upon the first submission or save of your feed.

Publish Start Date and Publish End Date allow you to define when the feed will be valid for output purposes. As long as today's date falls between the Start Data and End Date range, the feed will display output.

The Cache Duration field instructs the system on how often to look for new data related to the feed to display it on the front end. The default is set to "No Cache", although you can choose from among the following options:

No Cache 1 Minute 5 Minutes 15 Minutes 30 Minutes 1 Hour 4 Hours 8 Hours 12 Hours 1 Day 1 Week

Setting at least some cache will improve the performance of the feed, and the web site as a whole. Generally speaking, if your organization is producing content on a daily basis, setting a cache of between 4 Hours and 1 Day is good practice.

The "Add This RSS Script" field is system-generated upon the first submission or save of your feed. You can place this "Add This" link on the front end of your web site to allow users to seamlessly add feeds to their feed readers.

Choose the module from which your feed will pull data in the Module radio-button list. This field is fully searchable using the "Search" field, as well as the "Match" and "In" drop-downs.

The "Record Count" field allows administrators to display up to 999 records from a module in list format.

The Filter Type option allows administrators to query the module with either a custom SQL filter (choose "Manual") or a system-aided script (Choose "Dynamic"). "Dynamic" will work for the majority of scripts administrators create. Choosing "Dynamic" requires administrators to filter the module's content with the "Taxonomy" field.

Choosing one or more taxonomies from the "Taxonomy" field allows administrators to filter easily which records they wish to display. Choosing one taxonomy will tell the system to deliver the records that are tied to that taxonomy; choosing more than one taxonomy tells the system to display records that are tied to those taxonomies chosen.

For instance, if an administrator wants to display Articles that are tied to Taxonomy A, Taxonomy F and Taxonomy K. The administrator should choose those taxonomies from the Taxonomy multi-select field only, and the system will display records that are tied to all three taxonomies.

Administrators choosing the "Manual" option will have access to a "WHERE clause" field in which they can insert valid where-type clauses. Administrators should use the "Manual" filter only when they demonstrate a firm grasp of the fields (and their data types) available in each module and competency in SQL. Choosing "Manual” The common syntax for the Manual filter field follows closely that of a standard "where" clause in SQL. As an example, this "manual" filter looks for records whose taxonomy matches a specific ID:

(cpsys_DataCurrent.Taxonomy like '%086b607d-bac4-45cd-8600-06c877489f7b%')

The Archive Type field determines which type of records the feed will display. The options are: All Current, Expired, Future and Published.

"All Current" will display any record whether it is on hold or released, hidden or visible.

"Expired" will display all records whose Publish End Date is past.

"Future" displays those records whose Publish Start Date has not yet come.

"Published" displays records that are "released" and "visible" only.

The Audience Filter drop-down is required. Feeds can display records from only one audience at a time. This is a required field.

The Role Fitler drop-down is also required. Feeds can display records from only one role at a time. This is a required field.

The "Record Skip Count" field -- in conjunction with the "Record Count" field -- allows administrators to display the "[Record Count] - [Record Skip Count]" records from a given query, where [Record Skip Count] is a number less than the number assigned in the Record Count field. For example, if the "Record Count" field is 10 and the "Record Skip" field is 6, the feed will display five records -- in this case, records 7 through 10 -- of that 10-record list.

"Record Order" works in conjunction with the "Predefined Order" drop-down if administrators choose the "Predefined" value. This functionality allows administrators to display their lists in a desired order. Available predefined order options include:

Date Ascending (Oldest on top, newest on the bottom) Date Descending (Newest on top, oldest on the bottom) Highest Rated (highest rated on top) Most Viewed (most viewed on top) Random (completely random display of records) Title Ascending (A on top, Z on the bottom) Title Descending (Z on top, A on the bottom)

Choosing "Custom" allows administrators to define their own "Custom Order" clause. Administrators should use the "Custom" filter only when they demonstrate a firm grasp of the fields (and their data types) available in each module and competency in SQL. As an example, this "Custom order" filter will order the records by Field1, ascending:

Field1 ASC

The "Audiences" multi-select is for console use only. Administrators can choose relevant audiences to filter which administrators have access to which scripts.

The "Display Status" determines whether or not the contents of the dynamic feed are displayed on the front end of the web site.

Formatting your feed

Determining the display fields from the module occurs in the "Formatting" tab. The formatting tab includes the following fields: XML, XML Feed URL, XSLT, RSS, RSS Feed URL, RSS Feed Description, RSS Feed Link, RSS Item Title, RSS Item Description, RSS Item Encoded Content, RSS Item Publish Date, RSS XSLT, Atom, Atom Feed URL, Atom Title, Atom Link, Atom Author Name, Atom Author Email, Atom Entry Title, Atom Entry Summary, Atom XSLT.

The XML field allows you to determine whether or not CentralPoint will generate an XML document based on your choices in the "Details" tab. If you choose "Yes", CentralPoint shows you two more fields: XML Feed URL, which is system-generated upon submission; and XSLT, which is a standard schema document for the XML file. You can upload your own XSLT, but be aware it must meet W3C compliance to be considered valid XML.

Choosing "Yes" in the RSS field displays the following fields: RSS, RSS Feed URL, RSS Feed Description, RSS Feed Link, RSS Item Title, RSS Item Description, RSS Item Encoded Content, RSS Item Publish Date, RSS XSLT.

The RSS Feed URL is system-generated upon submission or save.

The RSS Feed Description will appear in the RSS feed below the title. This field can hold a maximum of 512 characters.

The RSS Feed Link should mimic the link structure on the front end of your web site: http://[domain name]/[Audience]/[Name of Navigation Item linked to the module in question]/ . Example: http://www.oxcyon.com/Main/News/ . The value in this field should always include the Navigation item name that is tied to the module from which your feed displays records. CentralPoint will automatically insert the remainder of the link upon feed generation.

The RSS Item Title field allows you to control which field from within your module acts as the title of the record as it displays in the feed itself. Typically, the entry here is "Title", but you can choose from among the other fields within your module. Be sure to populate this field with the SYSTEM NAME of the field you wish to display.

Similarly, you can control which field appears as the RSS description or teaser in the RSS Item Description field. Typically, the entry here is "Summary", but you can choose from among the other fields within your module. Be sure to populate this field with the SYSTEM NAME of the field you wish to display. This field is not required.

The RSS Item Encoded Content field allows you to populate HTML-heavy fields into the RSS feed. If you do not enter a value in the RSS Item Description field, this field is a good spot to place your fee-item summary or description. Take note, though, that this field is required.

The RSS Item Publish Date is what the system will use to order your feed items as they display if you are using the "Date Ascending" or "Date Descending" option in the Record Order field.

The RSS XSLT is a file that formats your feed appropriately to match RSS 2.0 standards set by the W3C. You can upload your own XSLT if you wish; however, be sure that it meets W3C standard. If it does not, your feed may not display properly.

Choosing "Yes" in the "Atom" field displays the following fields: Atom Feed URL, Atom Title, Atom Link, Atom Author Name, Atom Author Email, Atom Entry Title, Atom Entry Summary, Atom XSLT.

The Atom Feed URL is system-generated upon submission or save.

The Atom Title field controls the title of the feed itself. This field can hold a maximum of 256 characters.

The Atom Feed Link should mimic the link structure on the front end of your web site: http://[domain name]/[Audience]/[Name of Navigation Item linked to the module in question]/ . Example: http://www.oxcyon.com/Main/News/ . The value in this field should always include the Navigation item name that is tied to the module from which your feed displays records. CentralPoint will automatically insert the remainder of the link upon feed generation.

The Atom Author field allows you to control which field from within your module acts as the author of the record as it displays in the feed itself. Typically, the entry here is "Author" or "Byline", but you can choose from among the other fields within your module. Be sure to populate this field with the SYSTEM NAME of the field you wish to display.

The Atom Author Email field allows you to control which field from within your module acts as the author email of the record as it displays in the feed itself. Be sure to populate this field with the SYSTEM NAME of the field you wish to display.

The Atom Entry Title field allows you to control which field from within your module acts as the title of the record as it displays in the feed itself. Typically, the entry here is "Title", but you can choose from among the other fields within your module. Be sure to populate this field with the SYSTEM NAME of the field you wish to display.

Similarly, you can control which field appears as the Atom description or teaser in the RAtom Entry Summary field. Typically, the entry here is "Summary", but you can choose from among the other fields within your module. Be sure to populate this field with the SYSTEM NAME of the field you wish to display. This field is required.

The Atom XSLT is a file that formats your feed appropriately to match Atom standards. You can upload your own XSLT if you wish; however, be sure that it meets Atom standard. If it does not, your feed may not display properly.

Placing/linking your feed on the web site

There are two different ways to display your RSS feeds on the front end of your web site. The first is to copy the "Add This RSS Script" from your feed record and place it any where within the site that supports CP scripting. Placing this script will allow users to add the feed to their readers or simply view the RSS feed with their browsers.

The more straightforward approach is to, after submission, click on the "RSS" icon within the XML/RSS module grid view. That will spawn a new window that contains the feed. Copy the address from the browser window (it will look something like this: http://www.oxcyon.com/Rss.aspx?sn=firstrssfeed). You can then place this address as a link anywhere within your site using either the RTF editor or other URL controls available in various modules, such as Site Architecture > Site Navigation.

If you are building an audience-specific RSS feed, you must append the following query string to the end of the page name (http://www.oxcyon.com/Rss.aspx?sn=firstrssfeed): &aud=[SYSTEMNAME OF AUDIENCE], where [SYSTEM NAME OF AUDIENCE] is the system name of the audience for which you are creating the feed. An example feed url looks like this: http://www.oxcyon.com/Rss.aspx?sn=firstrssfeed&aud=sample1

In order to generate RSS from Navigation(SiteMap) you will need to use diffident XSLT file which you can download here.

Type Custom

We also support custom feed which let you create JSON feed. In order to create JSON feed you need to select application/json in Custom Content Type and format your feed accordantly. Here is basic example: Custom Feed Template Content:
[
[cp:literal:placeholders key='CustomFeedItemContent' /]
]
Custom Feed Item Content:
{ 
"name": [cp:literal:scripting key='Column' name='Title' format='"{0}"' /], 
"dataId": [cp:literal:scripting key='Column' name='DataId' format='"{0}"' /], 
"createDate": "[cp:literal:scripting key='Column' name='CreateDate' /]"
},
Template Gallery contains a template record to create JSON feed from news module.