创建一个菜单功能
2007-08-31 14:59
225 查看
1、创建一个菜单功能,该菜单功能是在网站设计中,属于网站集级别:
1.1创建文件Feature.xml
内容:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
Id="BAF0C4A7-C707-47d2-809B-8130BC344048"
Scope="Site"
Title="Download Book Code"
Description="A feature to open the code download page on Apress."
>
<ElementManifests>
<ElementManifest Location="Elements.xml" />
</ElementManifests>
</Feature>
1.2 创建文件Elements.xml
内容:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id=" 175B270F-239E-4955-97CB-94227E5DAA17"
GroupId="SiteActions"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="Download Book Code"
Description="This action takes you to the Apress code download page."
ImageUrl="_layouts/images/hand.jpg">
<UrlAction Url="http://www.ECJY.COM"/>
</CustomAction>
</Elements>
1.3 在C:"Program Files"Common Files"Microsoft Shared"web server extensions"12"TEMPLATE"FEATURES中添加一个文件夹,该文件的名称要取得和功能所表现的意思要接近。这样方便以后的维护。例如:CodeDownload。将刚才的两个文件拷贝到该文件中。同时将图片hand.jpg拷贝到C:"Program Files"Common Files"Microsoft Shared"web server extensions"12"TEMPLATE"images中,该图片是菜单图片。
1.4 注册该功能。
在DOC命令操作窗体中,将路径定位到C:"Program Files"Common Files"Microsoft Shared"web server extensions"12"bin,然后敲入:STSADM.EXE -o installfeature -filename CodeDownload"feature.xml –force。
1.5 进入首要网站——网站设计——网站集管理——网站集功能,这时候可以看到:有一项功能的名字和Elements.xml文件中的TITLE节点的内容一样,启动即可。
2.自定义一个网页。
2.1 创建feature.xml
内容:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
Id="2D9921AE-D263-4e2b-B4F7-ABDD6223C8B0"
Scope="Site"
Title="Content Type Hierarchy"
Description="Shows the hierarchical relationship between content types."
>
<ElementManifests>
<ElementManifest Location="Elements.xml" />
</ElementManifests>
</Feature>
2.2 创建 Elements.xml
内容
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="77C52F5D-D5C3-46a1-96EA-2B6B434564C2"
GroupId="Galleries"
Location="Microsoft.SharePoint.SiteSettings"
Sequence="0"
Title="Site Content Types Hierarchy"
244 CHAPTER 7 n SHAREPOINT CUSTOM FEATURES AND WORKFLOWS
Figure 7-3. Showing content types in a hierarchy
Description="Displays a hierarchy of site content types.">
<UrlAction Url="_layouts/ContentTypeHierarchy.aspx"/>
</CustomAction>
</Elements>
注意:与第一个练习比较最关键的不同是:Elements.xml的GroupId,该值指示功能按钮的区域或者位置。
2.3 创建一个网页ContentTypeHierarchy.html放到C:"Program Files"Common Files"Microsoft Shared"web server extensions"12"TEMPLATE"LAYOUTS中。
2.4 注册该功能
STSADM.EXE -o installfeature -filename ContentTypeHierarchy"feature.xml
2.5 启动该功能
进入首要网站——网站设计——网站集管理——网站集功能,这时候可以看到:有一项功能的名字和Elements.xml文件中的TITLE节点的内容一样,启动即可。
2.6 该功能在:进入首要网站——网站设计——库
1.1创建文件Feature.xml
内容:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
Id="BAF0C4A7-C707-47d2-809B-8130BC344048"
Scope="Site"
Title="Download Book Code"
Description="A feature to open the code download page on Apress."
>
<ElementManifests>
<ElementManifest Location="Elements.xml" />
</ElementManifests>
</Feature>
1.2 创建文件Elements.xml
内容:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id=" 175B270F-239E-4955-97CB-94227E5DAA17"
GroupId="SiteActions"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="Download Book Code"
Description="This action takes you to the Apress code download page."
ImageUrl="_layouts/images/hand.jpg">
<UrlAction Url="http://www.ECJY.COM"/>
</CustomAction>
</Elements>
1.3 在C:"Program Files"Common Files"Microsoft Shared"web server extensions"12"TEMPLATE"FEATURES中添加一个文件夹,该文件的名称要取得和功能所表现的意思要接近。这样方便以后的维护。例如:CodeDownload。将刚才的两个文件拷贝到该文件中。同时将图片hand.jpg拷贝到C:"Program Files"Common Files"Microsoft Shared"web server extensions"12"TEMPLATE"images中,该图片是菜单图片。
1.4 注册该功能。
在DOC命令操作窗体中,将路径定位到C:"Program Files"Common Files"Microsoft Shared"web server extensions"12"bin,然后敲入:STSADM.EXE -o installfeature -filename CodeDownload"feature.xml –force。
1.5 进入首要网站——网站设计——网站集管理——网站集功能,这时候可以看到:有一项功能的名字和Elements.xml文件中的TITLE节点的内容一样,启动即可。
2.自定义一个网页。
2.1 创建feature.xml
内容:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
Id="2D9921AE-D263-4e2b-B4F7-ABDD6223C8B0"
Scope="Site"
Title="Content Type Hierarchy"
Description="Shows the hierarchical relationship between content types."
>
<ElementManifests>
<ElementManifest Location="Elements.xml" />
</ElementManifests>
</Feature>
2.2 创建 Elements.xml
内容
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="77C52F5D-D5C3-46a1-96EA-2B6B434564C2"
GroupId="Galleries"
Location="Microsoft.SharePoint.SiteSettings"
Sequence="0"
Title="Site Content Types Hierarchy"
244 CHAPTER 7 n SHAREPOINT CUSTOM FEATURES AND WORKFLOWS
Figure 7-3. Showing content types in a hierarchy
Description="Displays a hierarchy of site content types.">
<UrlAction Url="_layouts/ContentTypeHierarchy.aspx"/>
</CustomAction>
</Elements>
注意:与第一个练习比较最关键的不同是:Elements.xml的GroupId,该值指示功能按钮的区域或者位置。
2.3 创建一个网页ContentTypeHierarchy.html放到C:"Program Files"Common Files"Microsoft Shared"web server extensions"12"TEMPLATE"LAYOUTS中。
2.4 注册该功能
STSADM.EXE -o installfeature -filename ContentTypeHierarchy"feature.xml
2.5 启动该功能
进入首要网站——网站设计——网站集管理——网站集功能,这时候可以看到:有一项功能的名字和Elements.xml文件中的TITLE节点的内容一样,启动即可。
2.6 该功能在:进入首要网站——网站设计——库
相关文章推荐
- C#第十周任务之最后一项之创建一个如下的窗体,并在窗体上放置一个菜单、一个工具栏控件。菜单内容如第二个图所示。工具栏上有两个按钮,分别对应“打开文本文件”、“保存文本文件”。菜单和工具栏具体功能实现可
- 使用jQuery插件sidr来创建一个隐藏式的边栏菜单
- 笔记——创建一个功能模块的笔记!
- Android创建一个选项菜单
- byx创建一个功能的流程
- c#创建静态类,在其中定义一个泛型方法,实现查找数组元素的功能
- extjs中如何创建一个带分页功能的Ext.grid.GridPanel
- 【Java】使用JFrame监听事件创建一个复制文本功能的窗体程序与按钮快捷键
- Oracle中用一个序列给两个表创建主键自增功能的后果
- Android网络编程之一个Android下菜单系统模块的实现(客户端—结算功能)
- 第四篇 ANDROID窗口管理服务实现机制 窗口管理是ANDROID框架一个重要部分,主要包括如下功能: (1)Z-ordered的维护 (2)窗口的创建、销
- android中创建具有自动提示功能的菜单
- 使用jQuery插件sidr来创建一个隐藏式的边栏菜单
- 使用 JavaScript 创建一个带动画效果的固顶导航菜单
- 创建一个宏,实现通过excel导出TXT文本功能
- 作业: 1.创建一个窗口程序(JFrame),标题栏起名为“浏览器”,有一个菜单条,有“文件”、“编辑”、“查看”3个菜单。“文件”菜单有两个菜单项,一项是“打开”,一项是“保存”,“打开”项做成子菜
- 使用PopupWindow创建一个简单的菜单
- oracle学习 五 使用存储过程创建一个重置密码为123456的功能(持续更新中)
- 创建一个提供搜索功能来搜索类(可执行文件)
- Android开发--身高体重指数(BIM)计算--添加菜单(Menu)(菜单功能、创建菜单、处理选项动作)