Hi guys,
I'm trying to realize a multilanguage page. For the links to switch I'm using CGSimpleSmartys function get_parallel_page().
But currently only the content for one language is completed. For the second language there are only empty pages. These pages are not shown in menu.
So the idea is to show a link only than if the checkbox "Show in menu" is activated.
So I need access to page properties of the parallel page. How can I do that conform to the system?
Access to page properties
-
- Power Poster
- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
Re: Access to page properties
Many thanks for your fast answer - I really appreciate that.
But it doesn't answer my question - how to access the page properties. I'm knowing only the old access via $contentobj.
And - by the way - your linked solution has only a link to the lang root pages. My setting links all pages to his similar / parallel page.
But it doesn't answer my question - how to access the page properties. I'm knowing only the old access via $contentobj.
And - by the way - your linked solution has only a link to the lang root pages. My setting links all pages to his similar / parallel page.
Re: Access to page properties
Well, I also do no have the answer for your question, but I just want to remark that the MLEcms module does that out of the box ... you set up parallel content trees, and only active pages get parallel linking.chandra wrote:Hi guys,
I'm trying to realize a multilanguage page. For the links to switch I'm using CGSimpleSmartys function get_parallel_page().
But currently only the content for one language is completed. For the second language there are only empty pages. These pages are not shown in menu.
So the idea is to show a link only than if the checkbox "Show in menu" is activated.
So I need access to page properties of the parallel page. How can I do that conform to the system?
I would seriously consider using this module, as it has a bunch of other functions for setting up a multilingual site. Not an easy module, though ...
hth,
Alex
Re: Access to page properties
Basic example without error checking etc:
UDT 'ShowInMenu'
Example use:
In your case I would consider to create one UDT to do all the work; find parallel page and determine if it should be displayed.
UDT 'ShowInMenu'
Code: Select all
$gCms = cmsms();
$contentops = $gCms->GetContentOperations();
$content = $contentops->LoadContentFromAlias($params['pagealias']);
return $content->ShowInMenu();
Code: Select all
{if {ShowInMenu pagealias=$page_alias}}yes{else}no{/if}
Re: Access to page properties
Thx Alex - find this information nowhere.faglork wrote: just want to remark that the MLEcms module does that out of the box ... you set up parallel content trees, and only active pages get parallel linking.
But module powered linking does not work for me. In cause of the dead line I've used CGSimpleSmarty for that.
Re: Access to page properties
Works like a charm - thank you too.velden wrote: In your case I would consider to create one UDT to do all the work; find parallel page and determine if it should be displayed.
With some modifications I can use it now for every key.