Page 1 of 1

[Solved] RSS2HTML Module configuration

Posted: Sun Dec 09, 2007 10:36 am
by percusionista
Hi

I've instaled RSS2HTML Module, to insert feeds frow other sites in my web and works fine, but there is something I don't know how to manage.

As it is, shows all variables in screen, title, autor, date, message, ... I just want only title of message with it's own link to theme forum to be shown.

I've read Module's help but I don't know how to manage this
The variable 'rss' contains all the elements of an RSS feed parsed into a number of arrays. Below is an example of how to access various parts of the feed (this is by no means a complete list):

    * The 'channel' array. Note that more elements may be available depending on the feed.
          o The title of the feed - $rss->channel.title
          o The language of the feed - $rss->channel.language
          o The site of where the feed originates - $rss->channel.link
          o The description of the feed - $rss->channel.description
          o The feed's tagline - $rss->channel.tagline

    * The 'items' array. Note that more elements may be available depending on the feed.
          o The title of the item - $item.title
          o The link to the item - $item.link
          o The description of the item - $item.description
          o The publish date of the item - $item.pubdate
          o The GUID of the item - $item.guid
          o The summary of the item - $item.summary
          o The date/timestamp of the item - $item.date_timestamp
So... what can I do to manage this?

thank you

Re: RSS2HTML Module configuration

Posted: Sun Dec 09, 2007 3:25 pm
by kermit
you need to change the rss template....

copy the contents of the default rss template to a new one called 'TitlesOnly'; then take out the parts you don't want...


{$rss->channel.title}

{foreach from=$rss->items item=item}
{$item.title}

{/foreach}



then you add the template to the rss module call.

{cms_module module='RSS2HTML' feed='BBC Americas' template='TitlesOnly'}



cmsms is based on the smarty templating engine, and just about everything has templates you can customize. learning how to do that is crucial if you want to progress past just using 'the defaults', whatever they may be.

Re: RSS2HTML Module configuration

Posted: Sun Dec 09, 2007 6:30 pm
by percusionista
Thank you, very much.

Now it works fine.
cmsms is based on the smarty templating engine, and just about everything has templates you can customize. learning how to do that is crucial if you want to progress past just using 'the defaults', whatever they may be.
that's true, I do it with templates and stylesheet, but I had not realized that all that items where included in template.
Your solution has open up my mind to this kind of "problems"