如何使用Sitecore Include文件修补属性值

Kev*_*bee 8 sitecore sitecore6

我需要创建一个Sitecore包含补丁文件,以将字符串添加到IgnoreUrlPrefixesweb.config中设置的现有值属性.

我试图用以下包含文件完全覆盖默认的忽略前缀:

<?xml version="1.0"?>
    <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
        <sitecore>
            <settings>
                <setting name="IgnoreUrlPrefixes">
                    <patch:attribute name="value">/foo/|/sitecore/default.aspx|/trace.axd|/webresource.axd|/sitecore/shell/Controls/Rich Text Editor/Telerik.Web.UI.DialogHandler.aspx|/sitecore/shell/applications/content manager/telerik.web.ui.dialoghandler.aspx|/sitecore/shell/Controls/Rich Text Editor/Telerik.Web.UI.SpellCheckHandler.axd|/Telerik.Web.UI.WebResource.axd|/sitecore/admin/upgrade/|/layouts/testing</patch:attribute>
                </setting>
            </settings>
        </sitecore>
    </configuration>
</settings>
Run Code Online (Sandbox Code Playgroud)

/foo/我想要添加到默认前缀的url前缀在哪里.ShowConfig.aspx标识尚未应用修改的配置.

理想情况下,我希望能够简单地添加/foo/到任何存在的默认IgnoreUrlPrefixes值.有谁知道这是否可行以及如何在Sitecore补丁语法中指定它?

Mar*_*lak 12

有关Sitecore所有可能性的详细解释,包括配置文件可以在这篇John West博客文章中找到.

您可以在链接的帖子中找到:

patch:attribute: Define or replace the specified attribute.
Run Code Online (Sandbox Code Playgroud)

它不允许"添加/foo/到任何存在的默认值IgnoreUrlPrefixes"属性.

  • 感谢Maras如此迅速地确认.我的原始文件中有一个拼写错误,导致它无法加载.我最终使用了`set:value`语法,因为它对于阅读文件的人来说更直观一些. (2认同)