Share content between language and business type

Hi there,

We have the following use case, and we are trying to figure out the best way to handle it:

We have a website with multiple locales and business types. Every combination of locale and business type can be seen a different “site”. However they do share some content.
(for example, business en-gb can have the same blogpost as customer en-gb, and this can also be used on business de-de).

Is there a way to avoid having to duplicate content, which would exists when building the content tree like:
business/en-gb/
business/de-de/
customer/en-gb/

Use case:
A new blog post is added to business en-gb, and should also be available for business de-de. How do we do this?

Would it be possible to add another setting property to the content types? and have this property shown in the content tree/filterable? Then we can use this property for filtering in the reactjs component.

As I didnt find anything about this, I am wondering if this is even possible, if this is not possible I would like to know as well.

With kind regards,

Sander

Hello Sander,

it is possible to use tags in the configuration of the stories:


The blog posts can be filtered afterwards using the with_tag parameter.

Or you add categories to the blog posts like it is explained in this article from our page:
https://www.storyblok.com/tp/how-to-build-a-content-relationship
This will allow you to use the filter_query parameter and search for stories which are of the same category/webpage.

The next part is how you want to organize the blog posts? I could image that you will need to keep them in one folder and use field level translation to get the content in one story (prevents duplication) and then use the language prefix to fetch the correct translation like in the following examples:
Single story:
https://api.storyblok.com/v1/cdn/stories/fr/home?version=published&token=5EgKInxYa31dIBnLS3UrSQtt&cv=1595520697
Multiple stories of a certain language:
https://api.storyblok.com/v1/cdn/stories?version=published&token=5EgKInxYa31dIBnLS3UrSQtt&cv=1595520697&starts_with=fr/

You can find more information about the single field translation in this article:
https://www.storyblok.com/docs/internationalization#option-1-single-tree-and-field-level-translation

Important to note:
You need to prevent to take the language codes from the language setup like in your examples en-gb, de-de and en-gb as folder names in the root of the space because this will hide the content and you won’t be able to request other content items using starts_with=en-gb when using field level translation.