logo
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
http://feeds.bbci.co.uk/news/world/rss.xml
Yemen war: Ceasefire takes effect in Hudaydah after skirmishes
China 'will not seek to dominate'
Youtuber's glitter bomb tricks parcel thieves

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
.title.
The title of the feed item
.source.
The original source of the quoted feed item
.no.
feed items number
.pubDate.
The date the item was published
.description.
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 / Yemen war: Ceasefire takes effect in Hudaydah after skirmishes
Hudaydah is reportedly calm after a UN-brokered ceasefire comes into force despite initial clashes.
(Tue, 18 Dec 2018 12:19:26 GMT)

2 / China 'will not seek to dominate'
Marking 40 year since key economic reforms, President Xi Jinping also said China would not be dictated to.
(Tue, 18 Dec 2018 08:15:40 GMT)

3 / Youtuber's glitter bomb tricks parcel thieves
A former Nasa engineer spent six months building a disguised glitter bomb to surprise thieves stealing parcels from his doorstep.
(Tue, 18 Dec 2018 12:27:53 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

NOTE :
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