sharepoint主题样式定制
来源:互联网 发布:百度seo教程蒋晖 编辑:程序博客网 时间:2024/04/19 18:46
主题样式
简介:
SharePoint2013关于主题样式的问题,相信大家都比较头疼,其实SharePoint有很好的解决方法。这里介绍一个自定义主题样式的方法。通过一个feature选择适合自己的样式,其它网站集只要激活该feature就能应用该主题。
实现:
添加模板页:
1、 添加一个module元素
2、 设置Elements
<span style="font-size:18px;"><?xml version="1.0"encoding="utf-8"?><Elementsxmlns="http://schemas.microsoft.com/sharepoint/"> <Module Name="MasterPage"Url="_catalogs/masterpage"> <File Url="MyMasterPage.master"Type="GhostableInLibrary" Path="MasterPage\MyMasterPage.master"IgnoreIfAlreadyExists="true"> <Property Name="UIVersion" Value="15" /> <Property Name="ContentTypeId" Value="0x010105"/> </File> </Module></Elements></span>
添加主题样式
1、 添加一个module元素
2、 在当前目录下上传你的样式文件 这里叫(MyTheme.spcolor)
3、 写Elements元素
<span style="font-size:18px;"><?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Module Name="Theme" Url="_catalogs/theme/15"> <File Path="Theme\MyTheme.spcolor" Url="MyTheme.spcolor" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" /> </Module></Elements></span>
添加字体设置
在上一个module中添加字体文件(MyFontScheme.spfont)
Element中添加一行元素
<span style="font-size:18px;"><File Path=”Theme\MyFontScheme.spfont” Url=”MyFontScheme.spfont”Type=”GhostableInLibrary” IgnoreIfAlreadyExists=”TRUE” /></span>
添加功能
添加feature,再为其添加监听事件。
将上面做的module添加到feature中去,在feature正激活事件中写。
<span style="font-size:18px;">publicoverridevoid FeatureActivated(SPFeatureReceiverProperties properties) { conststring ThemeUrl = "_catalogs/theme/15/bingoPalette012.spcolor"; conststring FontSchemeUrl = "_catalogs/theme/15/bingofontscheme002.spfont"; var site =properties.Feature.Parent asSPSite; if (site != null) { var serverRelativeUrl =site.RootWeb.ServerRelativeUrl; site.RootWeb.ApplyTheme(serverRelativeUrl + ThemeUrl, serverRelativeUrl+ FontSchemeUrl, null, true); }}</span>
这里的feature是向site级别部署的。
注意
当前站点的http://主机ip/_catalogs/theme/15/bingoPalette012.spcolor
要能找文件,如果找不到,将文件传上去。
总结
对于陌生的东西比较害怕,其实都是纸老虎。多看些,多了解些。
0 0
- sharepoint主题样式定制
- 定制主题
- 定制ExtJS 4.1主题
- 定制Sublime - 主题/快捷键
- Android主题定制
- 定制Ubuntu Numix主题
- ubuntu定制主题
- Ant Design主题定制
- 样式和主题&自定义样式和主题
- 样式和主题 + 自定义样式和主题
- SharePoint Css样式修改
- 专注SharePoint开发,工作流定制
- SharePoint 2010 导航菜单定制
- SharePoint定制开发个性皮肤
- 样式和主题之样式
- Blog样式定制
- datagrid样式表定制
- 定制Apache索引样式
- canada goose outlet Some people say that panty hose is the second ground skin of womens legs and it
- parajumpers sale Polo shirt is one of the maximum modish wears that anybody would like to clothe The
- parajumpers homme pas cher With current season comes
- parajumpers sale Leather plus pelt are frequently used to acquaint clothing shoes plus accessories f
- 【CodeForces】343D Water Tree 线段树
- sharepoint主题样式定制
- linux nfs 学习备忘
- PAT 1010. Radix (25)
- 快速排序的划分及其扩展
- KMP HDU 3746
- 网站问题处理过程
- 火车站
- 睡眠和休眠:常见问题
- 数据结构之--不相交集