MOSS 2007中如何添加VariationsLabelMenu来在不同语言的variation间切换?

本文介绍如何在SharePoint 2007中启用变化标签菜单,并解释了该功能默认被注释的原因。通过编辑VariationsLabelMenu.ascx文件并添加特定标签到主页面头部,可以实现变化标签菜单的显示。

步骤记录如下:

  1. Navigate to "~Program Files~\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES" on your SharePoint 2007 Server
  2. Edit the file "VariationsLabelMenu.ascx" and uncomment the line <cms:VariationsLabelEcbMenu id ="varlabelmenu1" DataSourceID="LabelMenuDataSource" DisplayText="<%$Resources:cms,VariationLabelMenuTitle%>" IsCallbackMode="true" runat="server" />
  3. Add the tag <%@ Register TagPrefix="PublishingVariations" TagName="VariationsLabelMenu" src="~/_controltemplates/VariationsLabelMenu.ascx" %> to the header of your masterpage.
  4. Add <PublishingVariations:VariationsLabelMenu id="labelmenu1" runat="server"/> in your masterpage to show the standard VariationsLabelMenu.

 

为什么VariationsLabelMenu.ascx中的那一行是被注释掉的呢?

原因如下:

The label menu takes an extra trip to the DB regardless of whether it is being displayed or not. Given that the control lives in the master page, every page takes this extra hit. Not good especially since most pages will probably not be part of a variations hierarchy. Hence it was commented out.

 

信息来源:

MOSS 2007: Enable VariationsLabelMenu (control to switch between variations)

http://www.ie-soft.de/blog/CommentView,guid,d63bf13e-e22b-400c-a715-d511833aec93.aspx

Variations Label Menu is not working in MOSS 2007 RTM

http://msmvps.com/blogs/obts/archive/2006/11/29/353355.aspx

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值