Jump to content

for adding description as well during RSS import

Featured Replies

Posted

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

 
  • Author

?????

Does the feed have a description field in each item?

Then it imports already. What's the actual issue that is causing you to ask the question?

rssimported.thumb.png.38d1edbee37fe729ac

  • Author

I dont want to import in forums...........

 

Please try RSS feed block to import on page....

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.

Archived

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

Recently Browsing 0

  • No registered users viewing this page.