问题
I need to patch agent in other environment so I have created a patch as below:
<agent type="Sitecore.Tasks.PublishAgent">
<patch:attribute name="interval" value="01:00:00" />
<param desc="mode (full or smart or incremental)">smart</param>
<param desc="languages">en</param>
</agent>
Here I patch attribute using <patch:attribute name="interval" value="01:00:00" />
But how can I patch a param?.Also how can I test the same?
Thanks
回答1:
You can patch exactly as you have posted, i.e. if the param matches an existing param of the same name then it will overwrite it. There is no need for any additional patch: attributes.
You can check the final config from http://<mysite>/sitecore/admin/showconfig.aspx
.
回答2:
If you want to patch param
, use patch:instead
:
<param desc="languages" patch:instead="param[@desc='languages']">en|pl</param>
You can test the patched values by accessing /sitecore/admin/showconfig.aspx
url on your server
来源:https://stackoverflow.com/questions/33110980/sitecore-8patching-an-agent