























wss站点定义不支持默认主题的设定。但是我们还是有办法实现该功能。
管理员通常有3种选择,每一种都不推荐。
问题的解决办法是在站点定义中增加一个链接到一个自定义页,该页将在站点创建后运行应用指定主题的代码。
第一步-更改站点定义
第二步-创建ThemeSetter.aspx
第三步-重新启动IIS
(在运行栏中执行“iisreset”),使得变更生效。
现在,使用您创建的站点定义创建的站点将自动的应用指定主题。
本文翻译msd2d上的文章而来,原文在此。http://msd2d.com/newsletter_tip.aspx?section=sharepoint&id=493c0348-5b00-4ef5-9410-018eebe84d67
<html dir="ltr">
<%@ Page Language="C#" ValidateRequest="False" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%

SPWeb myNewWeb = SPControl.GetContextWeb(Context);
myNewWeb.AllowUnsafeUpdates = true;
myNewWeb.ApplyTheme(this.Page.Request["Theme"].ToString());
myNewWeb.Update();
Response.Redirect(myNewWeb.Url);

%>
</html></body></html></body></html></body></html></body></html>
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。