无法设置AssetUrlSelector DefaultOpenLocationUrl属性 [英] Unable to set AssetUrlSelector DefaultOpenLocationUrl property
问题描述
将DisplayLookInSection属性设置为false,不会隐藏查找" "AssetUrlSelector"控件的期望"部分.
Setting DisplayLookInSection property to false, does not hide the "Look In" section of the AssetUrlSelector control as expected.
Sharepoint 2013中是否有针对此问题的修复程序?
Is there a fix for this issue in sharepoint 2013?
--------------------------------
--------------------------------
<%@注册TagPrefix ="cms"命名空间="Microsoft.SharePoint.Publishing.WebControls"程序集="Microsoft.SharePoint.Publishing,版本= 14.0.0.0,文化=中性,PublicKeyToken = 71e9bce111e9429c". %>
<%@ Register TagPrefix="cms" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
< cms:AssetUrlSelector ID ="urlSelector" runat =服务器" />
<cms:AssetUrlSelector ID="urlSelector" runat="server" />
--------------------------------
--------------------------------
谢谢!
推荐答案
您是否在环境中使用SharePoint 2010?
Did you use SharePoint 2010 in your environment?
我在SharePoint 2013(农场构建版本为15.0.4787.1000)测试环境中对其进行测试,DefaultOpenLocationUrl属性有效.
I test it in my SharePoint 2013(farm build version is 15.0.4787.1000) test environment, the DefaultOpenLocationUrl property works.
我将DisplayLookInSection属性设置为false,并且也不会隐藏查找范围"部分.
I set DisplayLookInSection property to false, and also does not hide the "Look In" section.
urlSelector.UseImageAssetPicker = true;
urlSelector.DisplayLookInSection = false;
urlSelector.DefaultToLastUsedLocation = false;
urlSelector.DefaultOpenLocationUrl = "/sites/team/Shared%20Documents";
如果要隐藏查找"部分,作为一种解决方法,我们可以修改AssetPortalBrowser.aspx(C:\ Program Files \ Common Files \ Microsoft Shared \ Web服务器扩展\ 15 \ template \ layouts)文件并添加一些CSS样式以将其隐藏.
If you want to hide the "look in" section, as a workaround, we can modify the AssetPortalBrowser.aspx(C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\template\layouts) file and add some CSS style to hide it.
最好的问候,
丹尼斯
这篇关于无法设置AssetUrlSelector DefaultOpenLocationUrl属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!