Saturday, May 16, 2009

How to change the bloodly PAGES when you create publishing page in page library

If you realize when you use page content type, regardless of where the document library is location, the path is always pointing to PAGES folder, it makes your path become very ugly in the URL..

www.yoursite.com/site1/pages/myPage.aspx
www.yoursite.com/site1/pages/myPage2.aspx

Below article highlights on how to customize this behaviour. Instead of using the default createPage.aspx, we will change it to something else. And make modification from there.

Before you start, one point to take note, YOU MUST ADD THE FOLLOWING NAMESPACE IN THE NEW PAGE ELSE YOU WILL SPEND HOUR ON DEBUGGING

Import Namespace="Microsoft.SharePoint.Publishing"


<%@ Import Namespace="Microsoft.SharePoint.Publishing" %>

http://blogs.msdn.com/syedi/archive/2008/07/18/why-should-one-save-publishing-pages-in-pages-list-always-in-moss-bend-it.aspx

No comments:

Post a Comment