Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We plan to use SharePoint 2010 application pages and wondered about our current setup, which has the default master page (v4.master) with no changes but a heavily customized page layout for the Publishing Pages. A question: Can an application page access the page layout that the Publishing Pages use or it can only access the master page?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Are you certain you need an application page? You can provision publishing pages via code in a document library set for Publishing Pages and also specify the layout. In publishing scenarios this is the normal pattern.

Application Pages are typically for more generic feature support not tied to any particular site collection which is why you cannot point to a specified site collection resource; in this case the Page Layout.

share|improve this answer
    
Thanks, Mike. Can Publishing Pages contain custom forms? We need to create about 70 or more request forms but don't want to use InfoPath. We'd like to use ASP.NET for the task and thought that application pages were the only way you could do this. –  Alex C Mar 16 '12 at 5:50
    
If you want to do custom forms then you would likely want to use ApplicationPages, but then the question is what do you need from a page layout? –  Mike Oryszak Mar 17 '12 at 22:23
    
The page layout contains the actual CSS layout in its HTML, as well as references to the necessary CSS and JavaScript files. Also, what do you mean in your answer provision publishing pages via code in a document library? –  Alex C Mar 18 '12 at 8:04
    
@AlexC Script and CSS references can be referenced directly in the ApplicationPage or in the MasterPage. –  Mike Oryszak Mar 18 '12 at 13:59
    
@AlexC You can programatically add a publishing page to a library and configure the web parts. I found an example here: andrewconnell.com/blog/archive/2006/11/15/5168.aspx –  Mike Oryszak Mar 18 '12 at 14:01
add comment

My understanding would be that an application page wouldn't have the publishing page content type, so publishing page layouts could not be applied to it. You may be able to work around some of it via custom code, but out of the box just creating one, I don't believe you'd have that option.

The application page will use the master, but not a publishing page layout.

share|improve this answer
    
Thanks, webdes03. That makes our task more interesting. –  Alex C Mar 15 '12 at 12:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.