I want to set the "Hidden" attribute for a listtemplate to hide it from the create list dialog. I need a solution where I can switch visibility of listtemplates on a per web basis. First I tried this:
$web.ListTemplates["Project Document Library"].Hidden = $true
Unfortunately the "Hidden" attribute is readonly. According to MSDN the attribute is defined in the SchemaXml attribute of the listtemplate. So I tried this:
$template=$web.ListTemplates["Project Document Library"]
[xml]$schema=$template.SchemaXml
$schema.ListTemplate.SetAttribute("Hidden", "TRUE")
$template.SchemaXml=$schema
Found out that SchemaXml is readonly as well.
Thank you for every hint about how to hide listtemplates...
Regards, Friedrich