Disable out of the box site definition
Is it possible to disable out of the box site definitions and show only the custom developed site defintiosn? TIA
May 8th, 2010 1:38am

Sure, set the site definition to hidden in the onet.xml file. ChrisChris Givens CEO, Architecting Connected Systems Blog Twitter
Free Windows Admin Tool Kit Click here and download it now
May 8th, 2010 11:28pm

Thanks Chris. I forgot to mention that, I need to hide out of the site definition for a particular site collection alone. Is it possible? Thanks again.
May 9th, 2010 12:44am

Justin, I don't know of formal way to hide a template based on a single site collection, but here's a way to do it with a little JavaScript: 1) In ...\12\TEMPLATE\LAYOUTS find newspweb.aspx and open it in Notepad or your favoriate editor. (you may want to backup this file first) 2) Just before last line of the file ("</asp:content>") add the following JavaScript 3) Edit the "if (window.location" line for your site collection 4) Edit the "if (selList.options[i].value==" line for the template IDs you want to hide <script> // change this line for your site collection if (window.location.href.indexOf('/sites/training/')>-1) { // remove items loaded with the page load removeitem(); // remove items loaded with a tab click var oldClientCallback = ClientCallback ClientCallback = function(result,context) { oldClientCallback(result,context) removeitem() } function removeitem() { var selList = document.getElementById("ctl00_PlaceHolderMain_InputFormTemplatePickerControl_ctl00_ctl00_LbWebTemplate") for (var i=0;i<selList.length;i++) { // update this line with your template IDs if (selList.options[i].value=="STS#0" | selList.options[i].value=="MPS#1") { try { selList.remove(i) } catch (err) {} break; } } } } </script> Mike Smith TechTrainingNotes.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
May 9th, 2010 5:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics