|
| 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!
|
|