Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Exclude fields from translation?


Go to End


4 Posts   1132 Views

Avatar
jand

Community Member, 30 Posts

16 July 2011 at 12:54am

Hi, is it possible to share certain information between the translations of a page? These fields should be only editable in the base language and greyed out in the translations (like the "PageType" field).

There was a similar request some time ago, I wonder if this is possible meanwhile?

Avatar
jand

Community Member, 30 Posts

20 July 2011 at 9:53pm

Or maybe someone has a workaround/hack (like a "copy this field to all languages" button)?

Avatar
martimiz

Forum Moderator, 1391 Posts

21 July 2011 at 5:44am

I don't think it's part of the Translatable module.

I'm thinking first you'd have to make the field readonly or (have it disapear) within the CMS for all pages except for the master page.

Next you'd have to add some functionality to the Page's OnBeforeWrite() or OnAfterWrite() method that checks if the current page is the master page, and if so, collects all translations, updates their corresponding field and then writes them to the database. Something like that :-)

Avatar
jand

Community Member, 30 Posts

22 July 2011 at 7:36pm

Okay, I see. Sounds like a plan :)

Thanks