문제

Has anyone ever managed to implement dynamic master pages on a publishing site?

Something along the lines of the master page switching automatically depending the referrer or some other passed through variable.

E.g. If the referrer was Google use master page “style1.masterpage” or if the referrer was MSN use master page “style2.masterpage” instead.

도움이 되었습니까?

해결책

The Communitiy Kit for SharePoint changes the master page dynamically. You can find a code sample in the latest CKS changset. Drill down to EBE -> CKS.EBE -> CKS.Blog. It is in the BlogHttpModule.cs in the BlogHttpModule_PreInit method. You will need to add the HttpModule to the web.config. For an example of that, check the WebAppFeatureReceiver.cs in the same project.

EDIT: Also, check out this answer for a blog post specific to this solution.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top