Create your own XML or RSS-feed reader with plain Smarty, there are no external modules or plug-ins needed!
Create a new content page and set WYSIWYG off.
Copy the following code in the content of the page. Note, this template is just an example: with the parameters below you can change it to your liking.
In the first line you can add the URL of the feed you want to display at your website.
The number "2" in the $cnt line above, is the number of feed items that will be shown at your page.
In the latest Smarty releases due to security settings PHP functions aren't available by default... If you do want to use PHP functions, you have to enable them by adding this line to your CMSMS config.php file:
This config variable loosens some of the security configuration for Smarty templates. Particularly enabling this option allows the use of any PHP function as a Smarty plugin. You better not use this option if you are allowing content to be submitted for display on your website from untrusted sources!
If the feed reader works without this line, you better not add it!
The next example is the output of the template described above and displays the official CMS Made Simple™ RSS News feed:
Generator: CMS Made Simple
4 October 2017
Last month, we were delighted to announce that, thanks to you, our excellent user base, we've been nominated in the CMS Critic awards in two categories! The vote is now underway! We know that many of you have already voted and that's fantastic.Read more
12 September 2017
Thanks to you, our excellent user base and your customers we have been nominated in the CMS Critic awards in not one but two categories! This wouldn’t have been possible without your excellent response to our request for help. The dev team would like to express its gratitude to all of you.Read more
The photo's in that feed are included in the description/content field and not seperately attached. Your options are more limited by this.
Change the feed or contact the owner of that website and let him change it...
Hello thank's for this but i can't import the image how i can proceed if you have an idea ?
I want to import rss flux from this wordpress blog : http://blog.colvert.com
Any idea to help me please ?
I i'm using this methode, but i have a problem with caching.
I can use your Cache remote file plugin for this but i don't seem to get it working.
Thank you, Joni!!
I updated the post with a check if the feed is present and added the enclosure tag to retrieve the item image URL from the news feed.
Bravo, Rolf. This is exactly what I am looking for on a page for a client!!!