Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Question: I'd like to protected a few nodes from being overwritten by usync in one of our implementations.
Has any thought been giving to adding a "magical" property called something like "usyncIgnore" or "usyncReadonly"? That way the code that imports could just skip it if the property is set?
Otherwise what's the impact to adding an event handler that prevents the node from being saved, How would I best do that without impacting the rest of the usync import process (i'd prefer not to have a redbar error message)?
Good news - there are some secret settings to stop nodes being overridden :)
on the content handler, you can add extra settings: https://usync.readthedocs.io/handler-config/#custom-handler-actions
the one you are looking for is ignore where you can put the path to the content you don't want to overwrite.
<HandlerConfig Name="uSync: ContentHandler" Enabled="true">
<Setting Key="ignore" Value="home\blog\example" />
You can comma separate so, for example, home\blog,home\shop would skip both blog and shop.
The only other extra thing is that sometimes you might still want the content writing out to disk, but not importing into your target site - for this, you can set the rulesonexport setting to false - then the rules won't count on export/save so everything is still on disk, even if it doesn't go back into your target site.
Hey Kevin, quick question... is the list case sensitive? How does the umbraco properties (like umbracoNaviHide and umbracoUrlName) play into this?
If my path is:
It's the path as usync would write it to disk, which uses the Umbraco function ToSafeFileName.
I think in your case that would probably be SiteConfiguration/SiteSettings.
Content properties have no effect it's all based on the path.
Hey Kevin, just another quick question, does it ignore all the child nodes? So in the example above if I used SiteConfiguration, would it also ignore the 3 nodes below it? The documentation isn't clear about that.
Yeah it should ignore anything starting with that path.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted