I'm working on a documentary project.
I'd like to 'broadcast' some web context resources (Extra Collections and their child resources/items) along localized web contexts (i.e: fr, en)
I'm able share 'web' context Collections child-sources/items as lists along contexts 'fr' and 'en' using getResources :
'web' context Collection (id)
'fr','en' contexts : getResource (id) > output Collection child-resources/items as lists
Therefore I'm searching a way to share Collections items/child-resources
as items along
'en' and 'fr' contexts.
I'm thinking about 2 ways :
1/ automatically create a symlink in 'en' and 'fr' for each 'web' Collection child-resource/item created with a plugin as described in these posts :
https://forums.modx.com/index.php/topic,59415.0.html
https://forums.modx.com/index.php/topic,66425.msg379597.html
2/ use a special page to output dynamically each 'web' Collection child-resources/items in each localized contexts.
Example :
Collection items/child resources list (with getResources)
id(1) > link to special page with &retrieveWebResourceId=1 > output WebResourceId=1 content in each context-localized 'special page', show the localized 'special page' with same alias than WebResourceId=1
id(2) > link to special page with &retrieveWebResourceId=2 > output WebResourceId=2 content in each context-localized 'special page', show the localized 'special page' with same alias than WebResourceId=3
id(n) > link to special page with &retrieveWebResourceId=n > output WebResourceId=n content in each context-localized 'special page', show the localized 'special page' with same alias than WebResourceId=n
http://fr.website.net/doc/web-collection1-itemresource1/ > should output
http://www.website.net/doc/web-collection1-itemresource1 in 'fr' context
http://en.website.net/doc/web-collection1-itemresource1/ > should output
http://www.website.net/doc/web-collection1-itemresource1 in 'en' context
http://n.website.net/doc/web-collection1-itemresource1/ > should output
http://www.website.net/doc/web-collection1-itemresource1 in 'n' context
It supposes that the 'special page" (one for each localized context, unique ID) should have different aliases regarding retrieved collection items/child-resources.
I guess it could have some consequences regarding SEO, maybe caching (?)...
Please note I use Babel, but I obviously don't want to have to duplicate collections items/child-resources for each localized contexts.
3/ Or, a third way -- but I didn't yet tested the extra -- with Contextualize 1.0.1-rc1
http://modx.com/extras/package/contextualize ?
What is the best way?
[ed. note: johnxx last edited this post 11 years, 10 months ago.]