Microsoft Content Management Server - populating postings from other postings

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > November 2004 > populating postings from other postings





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author populating postings from other postings
Jay

2004-11-04, 5:48 pm

Is there a way to populate a posting in the "site root
channel" from a posting in one of its sub-channels?

For example.

"www.mysite.com" is root channel

"aboutus" is sub channel

I want to populate a posting in the "www.mysite.com"
channel from a posting in the "aboutus" channel, without
using connected templates.

Here's what I have so far...

// Get the posting you're copying from
Posting superPosting =
CmsHttpContext.Current.Channel.Postings["standAlone"];
// Get the posting you're copying to
Posting copyPosting =
CmsHttpContext.Current.RootChannel.Postings["notAlone"];
// Loop through the placeholders in the first posting
for (int i=0; i < superPosting.Placeholders; i++)
{
copyPosting.Placeholders[i] =
superPosting.Placeholders[i];
}


From that I get an error on the "<" operator saying it
can be applied to a CMS posting collection.

Can anyone help?

Thanks!


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com