I need to create new custom site definition which inherited from Publishing Portal with all features and functionality. What is the best way to do this in Sharepoint 2013?
5
-
Why would you inherit a site definition ? , and I don't think if it's even possible, you can always copy a existing site definition and then modify as you required. – Muhammad Raja Sep 4 '13 at 8:35
-
1Or use a WebTemplate, feeling more modern and fresh ;) – Robert Lindgren Sep 4 '13 at 8:46
-
off course you would be better creating Web Templates then creating site definitions. – Muhammad Raja Sep 4 '13 at 9:08
-
@RobertLindgren could you please explain why web template is better than site definition? – Volodymyr Machula Sep 13 '13 at 8:48
-
blogs.msdn.com/b/vesku/archive/2011/07/22/… – Robert Lindgren Sep 13 '13 at 8:51
Add a comment
|
You can create a site definition with Visual Studio 2012 taking the onet.xml in
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\SiteTemplates\PUBLISHING\XML\
as starting point and add your custom features, modules, pages or whatever in it.
-
I copied onet.xml from PUBLISHING\XML\ and deployed new custom site definition. When I was creating site collection based on this site definition I received such error:
System.Runtime.InteropServices.COMException: <nativehr>0x8107058a</nativehr><nativestack></nativestack>The SharePoint Server Publishing Infrastructure feature must be activated at the site collection level before the Publishing feature can be activated.
Could you help me with this? – Volodymyr Machula Sep 4 '13 at 13:59 -
That error states that in the Site Collection settings you have to go to Site Collection Features --> Activate SharePoint Server Publishing Infraestructure. After it is activated try to create a new site with your customized site definition. If this doesn't work either, Save the out of the box publishing site as a template and use it in other sites – Alvmad Sep 4 '13 at 14:02
-
you have to go to Site Collection Features --> Activate SharePoint Server Publishing Infraestructure
Do you mean root site collection? Because custom site collection can't create due to error. If yes, I have already done it and received the same error – Volodymyr Machula Sep 4 '13 at 14:11 -
I mean the top level site collection where the site is going to be created – Alvmad Sep 4 '13 at 15:25