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

步骤记录如下:

  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

原文地址:https://www.cnblogs.com/awpatp/p/2152138.html