craftcms-site-sync icon indicating copy to clipboard operation
craftcms-site-sync copied to clipboard

[Feature Request] Site Selection

Open joelzerner opened this issue 6 years ago • 7 comments

Great work on this plugin!

I've recently begun using the plugin for a project with multiple sites and multiple site groups. My specific use case is to sync content between a Global EN and a US version of a site, however there are other translations and other sites present.

A great feature would be to have a site selector for the field setup, so the content sync would only occur between applicable sites.

For an interim solution, I'm using the plugin and have modified the $siteIds variable to be a manual array of the site(s) I want to update.

joelzerner avatar Mar 17 '19 22:03 joelzerner

@joelzerner yep, this would be an easy and useful addition.

For your uses, would you only want the site selection on the field settings, or would you want them on the field as well?

The most configurable I think would be field settings where you can select with sites are checked by default, but then you can always change it on the field. However, this may make the field more daunting/confusing that it already is.

timkelty avatar Mar 18 '19 12:03 timkelty

I would consider enabling site selection in the field settings only as my use case would always have the sites selected be consistent. However I can imagine a scenario where someone may want one entry to sync to all sites and another entry to only sync to one or none.

This leads me to another potential improvement I've discovered which I'll start a new issue for: #20

joelzerner avatar Mar 19 '19 03:03 joelzerner

@joelzerner if the selection is only in the settings, I would want still to be clear about which sites it was syncing with from the field, even if it just lists them.

timkelty avatar Mar 19 '19 10:03 timkelty

Sounds good to me!

joelzerner avatar Mar 19 '19 11:03 joelzerner

This also seems like it could be related to a custom "Translation Method" on your translatable fields…which I haven't really explored yet.

But as I understand it, it allows you do customize for which sites values get copied to.

However, I suppose we'd effectively be overwriting this setting on a per-entry basis, instead of per-field.

…just thinking out loud :)

timkelty avatar Mar 19 '19 12:03 timkelty

This would be a great feature to have!

rob-c-baker avatar Jun 04 '20 13:06 rob-c-baker

Next time I'm back in the codebase, I'll take a look. Otherwise, PRs are welcome!

timkelty avatar Jun 06 '20 03:06 timkelty