views:

46

answers:

2

Hi,
Is it possible to inherit a sharepoint master page(as a parent) in another application's master page which will be treated as child (i.e. after integrating that standalone application with the sharepoint application)? I am totally new to Sharepoint...Any links or article source related to this will be highly appreciated.

Regards, DC

A: 

Depends

SharePoint master pages are just other .Net masterpages. However if you're planning to use the same custom.master file, you will most probably receive errors because your stand alone application won't be able to find the SharePoint controls referenced on your .master file.

If you're talking about just a code behind, unless your the parent master class does SharePoint specific tasks, I don't see why you shouldn't be able to inherit from it in your standalone application.

If the reason you want to create the separate application is because you don't think its possible to put in standalone pages into SharePoint.. I've written a blog post to do this here: http://blog.zebsadiq.com/post/How-to-add-a-standalone-aspx-pages-to-SharePoint-navigation.aspx

[Edit]

Nested masterpage theory:

I've never tried this but you could: Refactor your SharePoint masterpage so that it uses a nested structure Stick parent.master in the /layouts/MyMasterpage/ Folder, The parent.master file by default will contain all SharePoint components. Wherever you define SharePoint controls, you put a custom placeholder tag around it.

Then create two children master pages, child1.master could then inherit from /layouts/MyMasterpage/parent.master. Additionally it could be installed AS the masterpage of your SharePoint site (via a feature). In theory, your Sharepoint site should work fine because parent.master has everything SharePoint needs, defined on it.

Child2.master could be your inherit from parent.master. It can override all placeholders that contain SharePoint specific controls. While obviously accommodating your forums application.

You may not be able to place a copy of parent.master in a place where both applications can see it but you might be able to duplicate the parent.master and its relating css files for both SharePoint and Forums. (Then you'll have to manage both).

This may or may not work, give it a go.

Zeb
hey Zeb, thanks for the response. To be more specific, i have an application which is created in sharepoint 2007 now i want to integrate another application(say a forum) build in asp.net, this perticular forum it self has a master page, now to integrate with my existing sharepoint application i have to also restore the look and feel of my sharepoint application in this forum app. For that i need to inherit the sharepoint master page in my forum app. Now instead of creating the dll for my application and adding them into the sharepoint app, is there any other way to achieve this functionality?
Dwaipayan
Say like we normally do for master page nesting. or some other way....thanks in advance.
Dwaipayan
Hmm i've had a thought about the nested masterpage option and have edited my post. I've never tried it out.. it may or may not work. If it doesn't then you're probably left with the following options: You can either a) Make your forums a sub section of your SharePoint b) Try to emulate your SharePoint look and feel in a seperate masterpage, layouts and css (going to be tricky but not impossible).
Zeb
+1  A: 

I would suggest use nested master page

Ashutosh Singh