Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Document type and rss feed View modes: 
User avatar
Certified Developer 10
Certified Developer 10
varinder-kudosweb - 8/6/2011 5:01:38 AM
   
Document type and rss feed
Hello,
im having a layout which displays news (repeater) and rss feeds (basic repeater with xml data source).
-both (news and rss) have a common field called 'date'
is it somehow possible to create a table which contains all the news and rss data so that it can be sorted by date in descending order?
cheers

User avatar
Certified Developer 10
Certified Developer 10
varinder-kudosweb - 8/8/2011 7:41:43 PM
   
RE:Document type and rss feed
Er.. anyone?

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 8/9/2011 3:01:41 AM
   
RE:Document type and rss feed
Hello,

In this case, you need to create a custom web part which will merge both datasets in the code-behind. Afterwards, you'll be able to sort them as per your needs.

Best regards
Ondrej Vasil

User avatar
Certified Developer 10
Certified Developer 10
varinder-kudosweb - 8/9/2011 3:33:31 PM
   
RE:Document type and rss feed
Thankyou for your replie ondrejv,
im new to c# could u post a sample code which shows how to make a web part, essentialy how to merge two datasets? and is there any confugration i need to do on my visual studio?

Anyway, i tried using query data soruce to select both tables, something like "SELECT * FROM CMS_news (found this table name from query tab in cms_news document type) AND View_Cms_Tree_Joined (found this table name from some rss document type) ORDERBY Date DESC;"

im pretty sure view_cms_tree_joined isnt the right table for getting rss data. is there any way to find tablename created by xmldatasource to store data?

cheers

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 8/12/2011 3:03:28 AM
   
RE:Document type and rss feed
Hello,

The merging code could look similar to this one: http://www.devasp.net/net/articles/display/706.html with only difference, you'll use our API to obtain particular data from your database repository (it is better than using pure asp.net database calls).

I would recommend you to create create custom datasource web part for this purpose.

Best regards
Ondrej Vasil

User avatar
Certified Developer 10
Certified Developer 10
varinder-kudosweb - 8/12/2011 5:39:07 PM
   
RE:Document type and rss feed
I'll give it a go.
thanks