Microsoft Content Management Server - Is this possible?

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > March 2005 > Is this possible?





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 Is this possible?
Diana

2005-03-28, 6:13 pm

I have a large amount (>500) of .txt files to migrate into CMS. Is it
possible to move the .txt files and create the web pages in CMS automatically
bypassing the workflow process (save, submit, and approve)? If so, what's
the best way? Any tools I could use?
Your input is much appreciated!
Kyong Kwak

2005-03-28, 6:13 pm

(1) Create a console application that links to the publishing api.
(2) create a new CmsApplicationContext
(3) Open the files and read contents
(4) create a posting using the CmsApplicationContext
(5) copy the data over
(6) repeat..

here a quick sample.. you need to fill it out, but that's your job.. =)

CmsApplicationContext myContext = new CmsApplicationContext();
cmsContext.AuthenticateAsCurrentUser( PublishingMode.Update ); //
assume that you are going to run the code -- and you have cms rights
Channel startChannel = ( Channel ) cmsContext.Searches.GetByPath(
/*initial path*/ );
// file i/o code
//
Posting newPosting = startChannel.CreatePosting( myTemplateIwantToUse );
Placeholder content = newPosting.Placeholders[0];
content.Datasource.RawContent = ( string )myFileIOedData;
newPosting.Submit();
newPosting.Approve();
// repeat

"Diana" <Diana@discussions.microsoft.com> wrote in message
news:2830FACA-300F-4932-99C7-2B67A62CA2C4@microsoft.com...
>I have a large amount (>500) of .txt files to migrate into CMS. Is it
> possible to move the .txt files and create the web pages in CMS
> automatically
> bypassing the workflow process (save, submit, and approve)? If so, what's
> the best way? Any tools I could use?
> Your input is much appreciated!



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com