Thursday, February 17, 2005

Free Online Edition of MCMS Book

Packt Publishing has launched a free online edition of the MCMS Book, Building Websites with Microsoft Content Management Server.

About the site...
This site is designed to give you free information about MCMS, and about the book "Building Websites with Microsoft Content Management Server" by Packt Publishing. This website will allow you to view content from the book. The site allows you to read through summaries of each chapter from the book (see below), and read through two full chapters (Chapter 6 and 18).

Click here to visit.

Friday, February 11, 2005

Vote in the .NETDJ Reader's Choice Award

Building Websites with Microsoft Content Management Server has made it to the list of nominees for the .NETDJ Reader's Choice Award 2005!

Cast your Vote here!

Wednesday, February 09, 2005

Guy Barrette Reviews Building Websites with Microsoft Content Management Server

Guy Barrette, a Business Architect in the Microsoft Team at Nurun in Montreal, a Microsoft Regional Director for the Montreal region and an MVP for ASP/ASP.NET reviews Building Websites with Microsoft Content Management Server on Universal Thread Magazine!

Here's a snippet of the review:

"This is the perfect book to learn MCMS. The writing style and the pace are excellent; perfect for experienced .NET developers to learn MCMS. What I like the most is the fact that it's full of hints that let you bypass some known (or less known) problems that you may encounter with MCMS, saving you hours of researches on the Web."

Read the full review here.

Monday, February 07, 2005

Getting the Inner URL of a Framed Posting in AuthoringNew Mode

Frames take up space. It's nice to have the navigation bar fixed at the top and sides of the page. However, when authoring with HtmlPlaceholderControls, these bars just occupy much needed screen space. How can we open a new page for authoring without the frames?

Part of the answer lies in the WebAuthorContext.GetAuthoringNewUrl() method. Simply pass in the destination channel and the posting's template - the method will return the URL of the posting in AuthoringNew mode. However, the returned URL still points to a page that has frames applied.

To remove the frames, you've got to insert ",frameless.htm" to the result. And voila! you've got the new posting without the frames applied.

Here's the code:

//gets the inner URL of a new posting

WebAuthorContext wac = WebAuthorContext.Current;
CmsHttpContext cmsContext = CmsHttpContext.Current;

Template t = cmsContext.Searches.GetByPath ("/Templates/myTemplate") as Template;
Channel c = cmsContext.Searches.GetByPath ("/Channels/myChannel") as Channel;
if (t!=null && c!=null)
string url = wac.GetAuthoringNewUrl(t, c);

url = url.Insert(url.IndexOf(".htm"),",frameless");