Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion usync/01.uSync/20.guides/62.syncRoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Your child site just needs the `uSync/root` folder copying into it, and its good
By default, the child site will be locked from overwriting root items, and won’t let you
save the changes in the UI. You can disable this by setting LockRoot to false in the config of the child site.

```cs
```json
{
"uSync": {
"Settings": {
Expand All @@ -56,6 +56,20 @@ save the changes in the UI. You can disable this by setting LockRoot to false in

When you want to update a child site copy the root folder to its uSync folder and import.

### Lock Root Types

You can also lock certain types individually. For example, you could configure your settings so that `documents` and `media` are locked, but everything else can be overwritten.

```json
{
"uSync": {
"Settings": {
"LockRootTypes": ["documents", "media"]
}
}
}
```

# Fancy Merging

What if you want to add a new property to a content type on a child site and you still want to get any updates from the root site? With fancy merging, you can do that.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ To add a new set to the drop down, you will need to do two things:
"uSync" : {
"Sets": {
"Default": {
"IsSelectable": true
},
"ContentOnly": {
"IsSelectable": true,
"DisabledHandlers": [
"LanguageHandler",
"DataTypeHandler",
Expand All @@ -34,7 +32,6 @@ To add a new set to the drop down, you will need to do two things:
]
},
"SettingsOnly": {
"IsSelectable": true,
"DisabledHandlers": [
"ContentHandler",
"MediaHandler",
Expand All @@ -48,9 +45,6 @@ To add a new set to the drop down, you will need to do two things:
}
```

:::tip
It's important to remember to set your set to Selectable in the configuration file (`"IsSelectable" : true`) or it will not appear in the dropdown.
:::

### 2. Add A Reference To The Set Configuration Programmatically

Expand Down
26 changes: 25 additions & 1 deletion usync/04.command/05.APIuser.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,28 @@ Alternatively, you can pass these on the CommandLine. eg.

`usynccli usync-ping -s https://localhost:44359 -s [client_secret] -k [client_id]`

Once this is set up, you can use all the [Commands!](Commands)
Once this is set up, you can use all the [Commands!](Commands)

## uSync.Command.Setup

You can also install the `uSync.Command.Setup` package to set the generate the user and client secret in Umbraco automatically. You can install this package by typing the following command in the command-line.

```
dotnet add package uSync.Command.Setup --version 16.1.0
```

This will allow you to add the `AddIfMissing` setting to the appsettings and fill in user details.

```json
{
"uSync": {
"Command": {
"AddIfMissing": true,
"Secret": "[CLIENT_SECRET]",
"ClientId": "[CLIENT_ID]"
}
}
}
```

Then uSync.CommandLine will search for a user with this client ID. If one does not exist it will create the API user and the client ID for you.