Closed getvois closed 8 years ago
Can you give an example? Maybe you can put all your data in an adminlist under modules? So the data is lang independent, but is it also version independent?
For example "Hotel list" module. Every hotel have the same gallery, adress, coordinates, phone number etc..
In our old cms "common tab" was pretty useful, we had non-translatable fields in common + translatable fields under each domain. Screenshot:
We usually solve that in a different way. We create entities that contain the non translatable info and link such an entity to the relevant page type. So in your example you would end up with a Hotel entity containing all of your fields in the common tab, and a HotelPage that contains a (ManyToOne) reference to a Hotel entity. You can also embed the form to edit the common data on a new tab of the page if you want, by using a listener (listening to the kunstmaan_node.adaptForm event).
Update: new screenshot, just for ideas - we also had additional properties with tagging options on entities.
so you will still have to add this non translatable entity to the each translation of hotel? and if you embed the form how could you choose the same entity for page translations? and if you have like 1000+ hotels its inconvenient to choose entity which it links to
You could add a tab with that kind of information. Have a look at the SEOBundle tab: https://github.com/Kunstmaan/KunstmaanBundlesCMS/blob/master/src/Kunstmaan/SeoBundle/EventListener/NodeListener.php#L40
There we fetch the SEO data (translated in this case), but it doesn't have to be if you use the nodeId and not the nodeTranslationId or entityId. Then you only have to create an entity with a link to the NodeEntity.
Thank you kimausloos for the suggestion, we can try it out. The coolest functionality for a customer would be the ability to add custom fields/pageparts also to that new (common) tab. So we don't need to add new fields manually every time needed.
I think that's possible too, you can implement a new tab (see here ) or add a collection in the entity, depending on your use case.
@jockri close
Pages can include for ex. "technical data" which is same in every language. Any way you have solved this in your projects?
Finest solution would be the "Common" tab with own pageparts.