保持簡單!
枚舉當前網站集中的所有網頁;
$collection = Get-SPSite http://localhost/
foreach ($web in $collection.AllWebs) {
$web | Select-Object -Property Title, Url, WebTemplate
$web.Dispose()
}
$collection.Dispose()
與每個網站/子網站相關的標題,網址和模板。 A full list of template are available here。
我寫了一個腳本來顯示您網站和網站中的所有可用模板;
$site = Get-SPSite http://localhost/
$web = $site.OpenWeb("")
Write-Host "Site: " + $site.id
Write-Host "Web: " + $web.id
$web.WebTemplate | Format-Table title, id -AutoSize
$template = $web.GetAvailableWebTemplates(1033)
Write-Host "Template: " + $template
$web.Dispose()
$site.Dispose()
模板存儲在12/14配置單元下; C:\ Program Files \ Common Files \ Microsoft Shared \ Web Server Extensions \ 14 \ Template \ Features \
佈局樣式表位於; C:\ Program Files \ Common Files \ Microsoft Shared \ Web Server Extensions \ 14 \ TEMPLATE \ LAYOUTS \ 1033 \ STYLES
使用Power Shell可以修改CSS關聯;
另一種方法是將聲明性標籤添加到您的母版頁中,
<SharePoint:CssRegistration Name="/_styles/yourstyles.css" runat="server" EnableCssTheming="true" After="true"/>
業,我和CSS在... – Etienne 2010-12-09 12:16:15