I have a question regarding the new October CMS 3.6 Nested Relation controller.
I’m particularly interested in its compatibility with multisite functionality.
How would I manage/set it up to function across multiple sites if I create a country, then create a city within that country, ensuring that the city is created in all sites (across all languages)?
Additionally, what happens if I delete a city in one site? Can I configure it to be deleted across every site (in every language)?
Am I able to use $propagatableSync in Tailor blueprints?
If yes, what about if records are created already, and me as a developer I add the propagatableSync just now? If my client delete a record in one site, it will be deleted in other sites as well?
In most cases: yes. When sync is turned off, you can still create synchronized records manually, and the user interface will prompt you with: A record does not exist; create one? At this point, the two records will become linked as if they were synced.
If you create the two records independently, then there is no such linkage, and they won’t be deleted since there is no way to know they are connected.
And when I create a collection for a gallery, does not create in all sites. And I expect like to be created the collection in all sites, and will be deleted in all sites if I delete a collection.
Am I doing something wrong? Because if I create a collection in a gallery, does not create in all sites.
Blueprints looks like below. I just added multisite: all and propagatableSync: true in
uuid: 85e471d2-09b9-4f3d-a63b-1ae9d92d2879
handle: Site\Menus
type: entry
name: Menu
drafts: false
pagefinder: false
multisite: all
propagatableSync: true
customMessages:
buttonCreate: New Menu
navigation:
label: Menus
icon: icon-sitemap
order: 300
fields:
slug:
label: Code
column:
label: Code
invisible: false
validation:
- required
items:
label: Menu Item
type: nesteditems
span: adaptive
maxDepth: 0
customMessages:
buttonCreate: Add Item
titleCreateForm: Create Item
titleUpdateForm: Edit Item
form:
fields:
title:
label: Title
tab: Reference
default: New Menu Item
span: full
type: text
validation:
- required
reference:
label: Reference
type: pagefinder
tab: Reference
tabs:
fields:
_menu_item:
type: mixin
source: Fields\MenuItem
uuid: 936f26c0-b816-4c78-afaa-0b6977e80213
handle: Fields\MenuItem
type: mixin
name: Menu Item
multisite: all
propagatableSync: true
fields:
is_hidden:
label: Hidden
comment: Hide this menu item from appearing on the website.
type: checkbox
tab: Display
code:
label: Code
comment: Enter the menu item code if you want to access it with the API.
tab: Attributes
span: auto
type: text
preset:
field: title
type: slug
css_class:
label: CSS Class
comment: Enter a CSS class name to give this menu item a custom appearance.
tab: Attributes
span: auto
type: text
is_external:
label: External Link
comment: Open links for this menu item in a new window.
tab: Attributes
type: checkbox
priority:
label: Priority
commentAbove: The priority of this URL relative to other URLs on your site.
tab: Sitemap
type: radio
column: false
inlineOptions: true
options:
'0.1': '0.1'
'0.2': '0.2'
'0.3': '0.3'
'0.4': '0.4'
'0.5': '0.5'
'0.6': '0.6'
'0.7': '0.7'
'0.8': '0.8'
'0.9': '0.9'
'1.0': '1.0'
changefreq:
commentAbove: How frequently the page is likely to change.
label: Change Frequency
tab: Sitemap
type: radio
column: false
inlineOptions: true
options:
always: Always
hourly: Hourly
daily: Daily
weekly: Weekly
monthly: Monthly
yearly: Yearly
never: Never
nesting:
label: Include nested items
shortLabel: Nesting
comment: Nested items could be generated dynamically by supported page references.
type: checkbox
tab: Reference
column: false
replace:
label: Replace this item with its generated children
comment: Use this checkbox to push generated menu items to the same level with this item. This item itself will be hidden.
type: checkbox
tab: Reference
column: false
scope: false
trigger:
action: disable|empty
field: nesting
condition: unchecked
And menu_item does not created in all sites, only in current site. Menu is created, but menu_items does not.