1

How can I add a patch file for Rainbow.Config? Is there a naming convention that I need to follow?

I need to modify below setting, but don't want to change the main Rainbow.Config file.

<setting name="Rainbow.SFS.SerializationFolderPathMaxLength" value="150" />

Please suggest.

2

3 Answers 3

5

Create a patch file; z.Rainbow.config.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
    <sitecore>
      <settings>
        <setting name="Rainbow.SFS.SerializationFolderPathMaxLength" set:value="150" />
      </settings>
    </sitecore>
</configuration>
1
-1

Write your patch file as below:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
    <sitecore>
        <settings>
           <setting name="Rainbow.SFS.SerializationFolderPathMaxLength" set:value="150" />
       </settings>
    </sitecore>
</configuration>

When you will publish your patch file it will update the value. You can check in showconfig.aspx. Thanks.

1
  • Actually, this won't work.
    – Mark Cassidy
    May 1, 2019 at 11:44
-2

Sitecore Patch functionality can resolve your problem. Patch file will replace your setting. Below are the example:

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <sitecore>
    <settings>
      <setting name="Rainbow.SFS.SerializationFolderPathMaxLength">
        <patch:attribute name="value">150</patch:attribute>
      </setting>
    </settings>
  </sitecore>
</configuration>


You can find more detail here Sitecore Patch

1
  • I would recommend adding the code sample directly to your answer so that others can copy and paste (have a look at Mark's answer for an example). May 1, 2019 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.