Home XtGem- Templates- XtScript- bottom

RSS reader

Add block > Utilities > Utilities >Rss reader
Insert a RSS feed into the page

Basic function

Feed :
The address of the rss feed to use as the source.
Number :
The number of entries to show from the feed
Template :
The template is what decides which content to use from the feed source
It takes the form of a html code with special variables to extract various values from the xml code used in creating rss
The standard default template only uses .link. and .title.
here is the output for a standard function showing 3 items from the feed at
Syria war: Pro-government forces enter Kurdish-held Afrin
Lawyer charged in Trump-Russia inquiry
Liu Wen: China supermodel's new year message sparks row

Paged rss (uses xtscript)

Paged rss feed xtscript

Advanced function
Template Variables

Note: Not all of these variables may be available in the feed source .link.
Contains the address of the feed item's web page
The title of the feed item
The original source of the quoted feed item
feed items number
The date the item was published
A text to describe the feed item.
This is often just a short text description of the feed item but it can be the full content of the item including links and images !
What is shown in the description is up to the feeds author
Here is the output of the same BBC news feed using this as a template
.no./ <a href=".link.">.title.</a><br />.description.<br />(.pubDate.)<br />
1 / Syria war: Pro-government forces enter Kurdish-held Afrin
Militiamen enter the Kurdish-held border area, prompting Turkish troops to fire "warning shots".
(Tue, 20 Feb 2018 18:39:09 GMT)

2 / Lawyer charged in Trump-Russia inquiry
Alex van der Zwaan, the 19th person to be charged, is accused of making false statements.
(Tue, 20 Feb 2018 16:05:09 GMT)

3 / Liu Wen: China supermodel's new year message sparks row
Liu Wen was accused of betraying her Chinese heritage by wishing fans a happy "Lunar New Year".
(Tue, 20 Feb 2018 12:07:27 GMT)

HTML code

If you wish To use the RSS function via html code the reserved characters " & < > in the template must be converted to html entities

RSS reader template converter

You cannot use feeds originating from rss/xml files on any xtgem site it will cause this error
"XT Error: Can`t read RSS files from XtGem sites."

Powered by XtGem
About us Contact Forum top