Reputation: 11442
I am working on moving the custom configuration settings for a Sitecore (6.2) project into a separate App_Config\Include
file. I am testing my changes using the sitecore page /sitecore/admin/ShowConfig.aspx. My question is what is the expected behaviour when using the <patch:delete />
element?
In my include file I have the following:
<setting name="Preview.DefaultSite">
<patch:delete/>
</setting>
When I look at ShowConfig.aspx I see the following:
<setting name="Preview.DefaultSite" value="website">
<delete/>
</setting>
Is this correct and expected behaviour, or should the <setting name="Preview.DefaultSite">
element completely disappear?
Upvotes: 1
Views: 1251
Reputation: 17000
The element should completely disappear and this works as expected for me in Sitecore 6.5 (update-5) and I know it worked in 6.4 as well.
Which version of Sitecore are you using?
All the patch attributes are mentioned here: All About web.config Include Files with the Sitecore ASP.NET CMS but the comments suggest some people had issues with this. This article from 2010 on web.config includes also mentions you cannot delete but like I said, it works in the newer versions.
You could always patch the attribute to remove the value:
<setting name="Preview.DefaultSite">
<patch:attribute name="value"></patch:attribute>
</setting>
Upvotes: 4