【问题标题】:Default to "Browse" tab when selecting images from Media Library?从媒体库中选择图像时默认为“浏览”选项卡?
【发布时间】:2013-09-24 04:09:56
【问题描述】:

在 Sitecore 7 的图像字段中浏览图像时,是否可以默认使用“浏览”选项卡而不是新的“搜索”选项卡?

新的搜索功能非常适合高级用户,但是,我的内容作者发现它令人困惑,尤其是结果中显示了多种语言。在某些情况下,选择搜索结果项也会产生错误,所以我现在只想禁用它。

【问题讨论】:

    标签: sitecore sitecore7


    【解决方案1】:

    在此文件 \sitecore\shell\Applications\Media\MediaBrowser\MediaBrowser.xml 您需要更改选项卡的顺序: 您将拥有:

     <Tabstrip ID="Tabs" Width="100%" Height="471px">
          <Tab ID="MediaLibraryTab" Header="Browse" Height="100%">
            <GridPanel Width="100%" Height="100%" Style="table-layout:fixed" Columns="3" GridPanel.Height="100%">
              <Scrollbox Height="100%" Class="scScrollbox scFixSize scFixSize8" Background="white" Padding="0px" GridPanel.Height="100%" GridPanel.Width="200" GridPanel.VAlign="top" Style="overflow:auto">
                <TreeviewEx ID="Treeview" DataContext="MediaDataContext" Click="SelectTreeNode" DblClick="TreeViewDblClick" ShowRoot="true" ContextMenu='Treeview.GetContextMenu("contextmenu")' Width="100%" />
              </Scrollbox>
              <VSplitter ID="MediaBrowserLeft" Target="left" GridPanel.Width="4" />
              <Scrollbox ID="Listview" Width="100%" Height="100%" Class="scScrollbox scFixSize scFixSize8" Background="white" Padding="0px" GridPanel.Height="100%" GridPanel.Width="100%" GridPanel.VAlign="top" />
          </GridPanel>
          </Tab>
         <Tab ID="MediaTab" Header="Search" Height="100%">
            <Frame SourceUri="/sitecore/shell/Applications/Buckets/MediaBrowser.aspx" Width="100%" Height="100%"></Frame>
          </Tab>
        </Tabstrip>
    

    而不是:

    <Tabstrip ID="Tabs" Width="100%" Height="471px">
       <Tab ID="MediaTab" Header="Search" Height="100%">
            <Frame SourceUri="/sitecore/shell/Applications/Buckets/MediaBrowser.aspx" Width="100%" Height="100%"></Frame>
          </Tab>
          <Tab ID="MediaLibraryTab" Header="Browse" Height="100%">
            <GridPanel Width="100%" Height="100%" Style="table-layout:fixed" Columns="3" GridPanel.Height="100%">
             <Scrollbox Height="100%" Class="scScrollbox scFixSize scFixSize8" Background="white" Padding="0px" GridPanel.Height="100%" GridPanel.Width="200" GridPanel.VAlign="top" Style="overflow:auto">
             <TreeviewEx ID="Treeview" DataContext="MediaDataContext" Click="SelectTreeNode" DblClick="TreeViewDblClick" ShowRoot="true" ContextMenu='Treeview.GetContextMenu("contextmenu")' Width="100%" />
              </Scrollbox>
              <VSplitter ID="MediaBrowserLeft" Target="left" GridPanel.Width="4" />
              <Scrollbox ID="Listview" Width="100%" Height="100%" Class="scScrollbox scFixSize scFixSize8" Background="white" Padding="0px" GridPanel.Height="100%" GridPanel.Width="100%" GridPanel.VAlign="top" />
            </GridPanel>
          </Tab>
       </Tabstrip>
    

    您只需更改标签 TAB 的顺序。

    【讨论】:

    • 我将修改后的文件放到 \sitecore\shell\Override 文件夹中,一切正常!
    【解决方案2】:

    如果您在新的 Speak UI 中使用媒体浏览器(在 Sitecore 7 中可用。?)您可以通过执行以下操作来完成相同的操作:

    在 /App_Config/Include/Sitecore.Speak.config 文件中替换以下行:

    <override xmlControl="Sitecore.Shell.Applications.Media.MediaBrowser" with="/sitecore/client/applications/Dialogs/SelectMediaDialog" />
    

    用线:

    <override xmlControl="Sitecore.Shell.Applications.Media.MediaBrowser" with="/sitecore/client/applications/Dialogs/SelectMediaViaTreeDialog" />
    

    感谢 Sitecore 支持提供的说明。

    【讨论】:

      猜你喜欢
      • 2016-04-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多