You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a multi site setup. Every site represents a language (default=nl, en, de, etc). Every page is available in each language/site. So each site has it's own tree. The trees between sites are identical, except that the nl tree points to the original collections item ID's, while the other sites point to the ID's of the copies of these collection items that were originally created for the nl site.
Imagine this ordered collection for the 'en' site:
Home
Categories
Category A
Category B
Category C
Contact
In the original nl collection this looks like this:
Home
Categorieen (is the origin of Categories)
Categorie A (is the origin of Category A)
Categorie B (is the origin of Category B)
Categorie C (is the origin of Category C)
Contact
I have this view, where I'd like to iterate over each category, get the title and url of that category. I don't like to have a view per site. How can I have 1 view, that is capable of looping through the categories, and displays the proper categories based on the current's site?
How do I fetch the categories of the current site? And how do I point to 'categories', as for NL the category page has a different ID than the translated page in EN does. They also don't have the same slug. The only thing they share is that the EN collection item will have an origin ID set which points to the NL collection item. Is there some identifier that such a page or tree node shares between sites?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a multi site setup. Every site represents a language (default=nl, en, de, etc). Every page is available in each language/site. So each site has it's own tree. The trees between sites are identical, except that the nl tree points to the original collections item ID's, while the other sites point to the ID's of the copies of these collection items that were originally created for the nl site.
Imagine this ordered collection for the 'en' site:
In the original nl collection this looks like this:
I have this view, where I'd like to iterate over each category, get the title and url of that category. I don't like to have a view per site. How can I have 1 view, that is capable of looping through the categories, and displays the proper categories based on the current's site?
How do I fetch the categories of the current site? And how do I point to 'categories', as for NL the category page has a different ID than the translated page in EN does. They also don't have the same slug. The only thing they share is that the EN collection item will have an origin ID set which points to the NL collection item. Is there some identifier that such a page or tree node shares between sites?
Beta Was this translation helpful? Give feedback.
All reactions