Last active
August 29, 2015 14:07
-
-
Save herskinduk/00645f77713dc2be0f0b to your computer and use it in GitHub Desktop.
Resolve Active Commerce and SBOS accelerators Sublayout conflict
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ActiveCommerce.Extensions; | |
namespace SbosAcceleratorsPlusActiveCommerce | |
{ | |
public class SkinnedSublayout : global::Sitecore.SbosAccelerators.Shared.Web.UI.WebControls.Sublayout | |
{ | |
protected override void CreateChildControls() | |
{ | |
if (global::Sitecore.Context.Site != null) | |
{ | |
base.Path = global::Sitecore.Context.Site.ResolveSkinPath(base.Path); | |
} | |
base.CreateChildControls(); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Sitecore.Reflection; | |
using Sitecore.SbosAccelerators.Shared.Web.UI; | |
using System.Collections.Specialized; | |
using System.Web.UI; | |
namespace SbosAcceleratorsPlusActiveCommerce | |
{ | |
public class SkinnedSublayoutRenderingType : SublayoutRenderingType | |
{ | |
public override Control GetControl(NameValueCollection parameters, bool assert) | |
{ | |
var sublayout = new SkinnedSublayout(); | |
foreach (string str in parameters.Keys) | |
{ | |
string str2 = parameters[str]; | |
ReflectionUtil.SetProperty(sublayout, str, str2); | |
} | |
return sublayout; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/"> | |
<sitecore> | |
<renderingControls> | |
<control template="sublayout"> | |
<patch:delete /> | |
</control> | |
<control template="sublayout"> | |
<patch:delete /> | |
</control> | |
<control template="skinned sublayout"> | |
<patch:delete /> | |
</control> | |
<control template="sublayout" type="SbosAcceleratorsPlusActiveCommerce.SkinnedSublayoutRenderingType, SbosAcceleratorsPlusActiveCommerce" propertyMap="Path=path" /> | |
<control template="skinned sublayout" type="SbosAcceleratorsPlusActiveCommerce.SkinnedSublayoutRenderingType, SbosAcceleratorsPlusActiveCommerce" propertyMap="Path=path" /> | |
</renderingControls> | |
</sitecore> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment