jeudi 14 juin 2012 11:07
I'm trying to create a custom CreateWikiWebPage.aspx. This page will be the destination of the "create new wiki page" link. In functional terms, it's working correctly: it's creating a new wiki page in the correct place, and with the correct custom layout.
The problem is the layout of the page itself. I can't define a master page other than the default.master, like so:
<%@ Page Language="C#" DynamicMasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.ApplicationPages.CreateWebPage" %>
This makes the page appear with the backoffice out of the box sharepoint layout, instead of the custom one i want to use.
Can someone tell me how to change the master page to the custom i have?EDIT: I forgot to mention: if i change the site System Master Page in the Wiki site to the Custom one i want, the page appears correctly, but, obviously, the backoffice of the site adopts it as well.
- Modifié lreis01 jeudi 14 juin 2012 11:17 more information
Toutes les réponses
mardi 19 juin 2012 09:07Modérateur
I’m sorry for can’t understand your means. So, you said you can’t define a master page other than the default.masyer. But you said you change the site System Master page in the wiki site to custom one you want, the page appears correctly.
So, I think you want to change the wiki site master page, but you don’t want to your back office site apply it as well. Is back office site your sub site. If it is, when you change the wiki site master page, you shouldn’t choose the option of “Reset all subsites to inherit this system master page setting”. If I misunderstood you, please let me know fell free.
You can refer to the following link.
mardi 19 juin 2012 09:25
Hi Jack, and thanks for the reply.
Basically, the page is located in the "_layouts" folder of the file. Thanks to that, if i define a master page that is not located in the _catalogs/masterpage folder of the subsite itself (for example, if my current site is root/main_site/current_site), it can't access the master page folder, which is root/master_pages.
What that means is that, if i define a custom master, different from the default.master, it gives an error "file not found".
Since i noticed this, i was able to figure out that, if i upload the custom.master page to that master page gallery, than it works. However, the upload has to be manual (for some reason, if i pass it through code, none of the actions i the CustomCreateWikiWebPage.aspx work correctly).
It's not a perfect solution, but since the wiki itself will only be created once, it's not a major issue.
- Marqué comme réponse lreis01 mardi 19 juin 2012 17:34