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

Virtual Page to a page in another language


Go to End


4 Posts   1978 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, 36 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