Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 13, 20169 yr 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
January 21, 20169 yr Author 17 hours ago, Nathan Explosion said: Does the feed have a description field in each item? Yes... http://mechanical-engg.com/forum/forum/44-question-answers.xml The feed is also of IPB and also ia m importing in IPB
January 21, 20169 yr Then it imports already. What's the actual issue that is causing you to ask the question?
January 22, 20169 yr Author I dont want to import in forums........... Please try RSS feed block to import on page....
January 22, 20169 yr 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.