Jump to content

for adding description as well during RSS import


Saurabh Jain

Recommended Posts

Base template  for importing rss feed   I am importing RSS feed of a forum

 

{{if !empty( $items ) }}
	<h3 class='ipsWidget_title ipsType_reset'>{$title}</h3>
		<div class='ipsPad_half ipsWidget_inner'>
			<ul class='ipsDataList ipsDataList_reducedSpacing'>
				{{foreach $items as $item}}
					<li class='ipsDataItem'>
						<div class='ipsDataItem_main'>
							<a href="{$item['link']}" target="_blank" class='ipsDataItem_title ipsType_break'>{wordbreak="$item['title']"}</a><br>
							<span class='ipsType_light ipsType_small'>{datetime="$item['date']"}</span>
						</div>
					</li>
				{{endforeach}}
			</ul>
		</div>
{{endif}}

It shows only title and date 

I will like to add Description as well

Can any 1 modify this code to get description as well

Thx in advance

Regards

Saurabh

 
Link to comment
Share on other sites

Now we're getting somewhere.....that information, plus the url of the feed, added to your opening post would have been a lot clearer and probably would have resulted in a quicker answer.

Anyway....I'll help you help yourself now....

Add the following

{{var_dump($item);}}

after

{{foreach $items as $item}}

and then look at the preview to determine which field contains the description you want to display.....and then add

$item['WHATEVERTHATFIELDISCALLED']

somewhere in your code.

You've got the title, link and date fields being displayed already, so you can use them as a reference on what/how it can be added in.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...