1

I am trying build a hub of sorts using Craft 3. I want the main site to be the hub which manages most of the data, and then subsequent sites are built on top of that, relating where necessary so as to normalize the core data. I do NOT want the entries to propagate from the core site to the sub sites. I want them to only exist in the Core Site and be related to.

Here is the basic site structure:

  • Core Site En (coresite.com)
  • Core Site Fr (coresite.com/fr)
  • Sub Site En (subsite.coresite.com)
  • Sub Site Fr (subsite.coresite.com/fr)

I then have an entry on Sub Site with a related Entries field. Since the entries do not propagate, when you try to select an entry, the list of options is empty. To fix this I check "Relate entries from a specific site?". The problem is I can only choose one site, forcing me to choose either the EN or FR version of the Core Site.

If I choose EN that works fine, but when I'm on Sub Site FR and access the related entry, it's in English and doesn't respect the translated version of it on Core Site FR.

This seems to be a big trade off in the decision to treat languages as sites.

Is there something I'm missing?

  • That's natural because you don't propagate them and these are the reasons why you have site groups. So you can populate them within their group to gain all the translations but still handling them in their custom scope. So you have an English + French version in your core site but not an English and French version in the sub site. Then you can relate them properly and fetch the correct language in your template – Robin Schambach Oct 10 '18 at 19:56
  • Ok I had another comment but believe I've found my confusion. The testing I was doing was changing the actual entry titles, which seems to not have an option for translating only by language and is why I did not see the updates working. I find it confusing that when I'm in Sub Site EN and update an entry, it propagates back to the original entry in Core Site EN where it was first made. What I was looking for was a way to handle things in one site without having those entries accessible in the other sites. I suppose this is not possible unless not using localization and doing it the way in OP? – Dexterity Oct 10 '18 at 20:56
  • There is of course.. That's what the different translation methods are good for craftcms.stackexchange.com/a/27014/5557 – Robin Schambach Oct 10 '18 at 20:59
  • But I must propagate? I want to be able to choose from Core entries in a Sub site related entry field, but without propagating there are no entries to choose from unless I specify a specific site to choose entries from in the field settings. This is what I can't see how to do, regardless of Site Groups. I understand how to achieve when using propagation. – Dexterity Oct 10 '18 at 21:29
  • That's done via custom relation field that has a different siteId based on the current site id – Robin Schambach Oct 10 '18 at 21:34
2

You can use a matrix field with a block and entries field for each sub-site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.