Kunstmaan / KunstmaanBundlesCMS

An advanced yet user-friendly content management system, based on the full stack Symfony framework combined with a whole host of community bundles. It provides a full featured, multi-language CMS system with an innovative page and form assembling process, versioning, workflow, translation and media managers and much more.
https://kunstmaancms.be
MIT License
402 stars 186 forks source link

[NodeBundle] Would be nice to have "common/non-translatable" datafields #326

Closed getvois closed 8 years ago

getvois commented 9 years ago

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.

krispypen commented 9 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?

getvois commented 9 years ago

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: common2

wimvds commented 9 years ago

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).

getvois commented 9 years ago

Update: new screenshot, just for ideas - we also had additional properties with tagging options on entities.

konstantinsp commented 9 years ago

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

kimausloos commented 9 years ago

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.

getvois commented 9 years ago

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.

kimausloos commented 9 years ago

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.

sandergo90 commented 8 years ago

@jockri close