[solved] cms_selflink tag and multilanguage

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
Locked
andym
Forum Members
Forum Members
Posts: 31
Joined: Mon Dec 24, 2007 9:00 pm

[solved] cms_selflink tag and multilanguage

Post by andym »

Hi,

I have managed to use $mle_translation for breadcrumbs and search tags ok but the cms_selflink tag simply takes through the text and does not resolve the variable.

All I see is $mle_translation.previous_page displayed.

If I drop the quotes I get array.previous_page


{cms_selflink dir="previous" label='$mle_translation.previous_page'}


Any suggestions?

Andy.
Last edited by andym on Mon Feb 23, 2009 6:13 pm, edited 1 time in total.
andym
Forum Members
Forum Members
Posts: 31
Joined: Mon Dec 24, 2007 9:00 pm

Re: cms_selflink tag and multilanguage

Post by andym »

I have tried a simple mod to the plugin, but clearly the relevant variables are not defined there.

I put in the following code in place of the current lines:

$Prev_label = $mle_translation.Prev_label; // andym
$Next_label = $mle_translation.Next_label; // andym
$Parent_label = $mle_translation.Parent_label; //uplink andym
And of course in mle lang file:

// Navigation

'Prev_label'=>'Previous page',
'Next_label'=>'Next page',
'Parent_label'=>'Parent page:',

The result is a moan about undefined constant and Next_label is displayed on the screen in the page.

Any clues as to the missing bit of the jigsaw anyone?

A.
andym
Forum Members
Forum Members
Posts: 31
Joined: Mon Dec 24, 2007 9:00 pm

Re: cms_selflink tag and multilanguage

Post by andym »

Cracked it!  Found the answer in another topic.

Use this approach in the template and it works just fine:

{capture assign='prev_page'}{$mle_translation.Prev_label}: {/capture}
{capture assign='next_page'}{$mle_translation.Next_label}: {/capture}

            {cms_selflink dir="previous" label="$prev_page"}

            {cms_selflink dir="next" label="$next_page"}

Works a treat.

A.
Locked

Return to “[locked] CMSMS MLE fork”