Stefan [MSFT]
Guest
|
Posted:
Mon Nov 14, 2005 5:50 pm Post subject:
Re: Check in templates via script |
|
|
Hi John,
you need to submit the template to check it in before you run the commit.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------
"Lta" <Lta@discussions.microsoft.com> wrote in message
news:0ED38D44-8561-471D-B1A7-FA946E483018@microsoft.com...
| Quote: | we are running scripts to modify the custom properties of all templates
on
out site.
All works well but the templates remain checked out and this causes errors
on all machines except the machine script was run on.
we use:
Microsoft.ContentManagement.Publishing.CmsApplicationContext context =
new Microsoft.ContentManagement.Publishing.CmsApplicationContext();
context.AuthenticateAsCurrentUser(Microsoft.ContentManagement.Publishing.PublishingMode.Update);
Microsoft.ContentManagement.Publishing.TemplateGallery gallery =
(Microsoft.ContentManagement.Publishing.TemplateGallery)context.Searches.GetByPath("/Templates/LtaOnlineV2");
Assert.AreEqual("LtaOnlineV2", gallery.Name);
Assert.IsTrue(gallery.CanSetProperties);
CheckGallery(gallery);
context.CommitAll();
context.Dispose();
I hoped .CommitAll() and .Dispose() would check in but it dosen't. How
should we check in all templates after the script has run?
Thanks
John
|
|
|