Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Lastest news from another site. View modes: 
User avatar
Member
Member
Leandro Brito - 11/10/2011 12:24:17 PM
   
Lastest news from another site.
Hello,

I have 3 sites in kentico and need show the lastest news of site1 on site3.

Ex.:

Site3

Lastest news

news1
news2
news3

where all news are from site1.

Is possible to do this by portal engine or I need make a specific webpart?
Can you provide me some orientation to start this?

Thanks!
Best Regards

Leandro Brito

User avatar
Member
Member
kentico_michal - 11/12/2011 7:23:57 AM
   
RE:Lastest news from another site.
Hello,

You can use a standard Repeater web part. However, you need to specify the Site name property to a site from which you want documents display.

Best regards,
Michal Legen

User avatar
Member
Member
luyolo.mhlauli-nmmu.ac - 7/2/2012 4:50:23 AM
   
RE:Lastest news from another site.
What happens if you want to display news from Site 1 , Site 2 and Site 3

User avatar
Member
Member
Leandro Brito - 7/2/2012 8:44:56 AM
   
RE:Lastest news from another site.
You can use Repeater with query.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/3/2012 4:33:14 PM
   
RE:Lastest news from another site.
Hi,

You can also use three repeaters and each set to display items from given site.

Best regards,
Juraj Ondrus

User avatar
Member
Member
luyolo.mhlauli-nmmu.ac - 7/4/2012 8:15:40 AM
   
RE:Lastest news from another site.
I managed to figure this out. I had to display news in a scrolling news webpart. So I cloned the scrolling text webpart since scrolling news webpart inherits from scrolling text webpart. In my cloned scrolling text webpart I set the SiteName field type to multiple site selector instead of site selector which will have sitenames separated by a semi colon ( ; ) . and in the code behind I add this line of code below this line of code .

repItems.WhereCondition = WhereCondition;


String whereadd = "' OR SiteName ='";

if ( SiteName.IndexOf(";") != -1 )

{
repItems.SiteName = "##ALL##" ;
if( repItems.WhereCondition != "")
{
repItems.WhereCondition += " AND DocumentNodeID IN ( SELECT NodeID FROM View_CONTENT_news_Joined WHERE SiteName = '" + SiteName.ToString().Replace(";", whereadd) + "')";
}
else
{
repItems.WhereCondition = "DocumentNodeID IN ( SELECT NodeID FROM View_CONTENT_news_Joined WHERE SiteName = '" + SiteName.ToString().Replace(";", whereadd) + "')";
}

}

I then create a new scrolling news webpart which inherits from my the cloned scrolling text webpart. I now have a scrolling news webpart which selects news from multiple sites chosen using a multiple site selector