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.

Customising the CMS /

Virtual Page to a page in another language


Reply


4 Posts   1237 Views

Avatar
Futureal

Community Member, 9 Posts

28 April 2010 at 11:19pm

I have a two-language Silverstripe website, created with the multilangual functionality.

One menu-item and all of its sub-items is only available in the original language.
For the other language, I was thinking of creating a Virtual Page that linked to the menu-item in the original language, so that all the sub-pages would still show in the menu.
In the dropdown of the virtual page I can however only choose from the pages in that particular language. Is there any way to get around this and create a virtual page that links to another language?

Thanks in advance.

Avatar
Futureal

Community Member, 9 Posts

30 April 2010 at 1:58am

Anyone?
Or perhaps a way to realize the same goal?

Avatar
Futureal

Community Member, 9 Posts

3 May 2010 at 7:38pm

Can someone at least shed some light on this case and tell me whether it is (ever) possible or not?

Avatar
Ironcheese

Community Member, 33 Posts

12 June 2010 at 10:23am

Edited: 12/06/2010 10:24am

Hi there,

i was (or still am) in the exact same position.
My workaround so far is, to add custom DB fields for the pages. You have to kind of extend the TranslationGroupID functionality here.

So what i did, was to add DB Fields which add holds a "MasterPageID" (the ID of the Page in your default language) and a simple Boolean Field which just holds the information if this page is linked to its MasterPage. (I managed that with a checkbox in the backend.)

In the init() function of my page, i have a simple if statement which checks if this current page is linked to another page, if yes -> get the content of that page and replace it with the current page content.

Not sure if this is a good way, but it works. xD