How can I change "return" link? CMSMS news module.

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
PauliusJ
New Member
New Member
Posts: 8
Joined: Wed May 23, 2012 10:50 am

How can I change "return" link? CMSMS news module.

Post by PauliusJ »

Hello everyone, I really searched for this, but can't find any answers..

I have a news module, everything is ok, but when I view news in a full view there is a "return" link, it does work and everything, but I want to change "return" to something else, well to be specific I want to change it to my language, but I can't find where to do that.

Here is my details template:

Code: Select all

{if $entry->postdate}
<font class="date">{$entry->postdate|cms_date_format:"%Y-%m-%d"}</font><br>
{/if}
<b>{$entry->title}</b><br><br />
{eval var=$entry->content}<br />
<br />
{if $return_url != ""}
{$return_url}
{/if}
Please someone help me.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: How can I change "return" link? CMSMS news module.

Post by velden »

Those strings should be translated anyway. Maybe you need to set the default language of your website:
Site Admin -> Global Settings -> Default language for the frontend

Else (although deprecated) you could try

{News lang="xx_XX"}
(optional) lang="en_US" - Deprecated - Override the current language that is used for selecting translated strings.
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am

Re: How can I change "return" link? CMSMS news module.

Post by applejack »

Code: Select all

{if $return_url != ""}
{$return_url|replace:'return':'back in my language'}
{/if}
or

Code: Select all

<a href="news">back in my language</a>
or

Code: Select all

<a href="javascript.history.go(-1)">back in my language</a>
PauliusJ
New Member
New Member
Posts: 8
Joined: Wed May 23, 2012 10:50 am

Re: How can I change "return" link? CMSMS news module.

Post by PauliusJ »

Thank you guys very much!

This is was what I wanted:

Code: Select all

{if $return_url != ""}
{$return_url|replace:'return':'back in my language'}
{/if}
Yeah, I too thought about javascript solution:] but if someone gets to my site from an external link, then history.back will take them back to previous site, so it isn't that good. Solution above is just perfect, thanks.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: How can I change "return" link? CMSMS news module.

Post by Rolf »

Did you change the frontend language setting to your language at Global Settings in the admin? The return text should change automaticly...
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
PauliusJ
New Member
New Member
Posts: 8
Joined: Wed May 23, 2012 10:50 am

Re: How can I change "return" link? CMSMS news module.

Post by PauliusJ »

Yes, now that you mentioned it, I tried changing language and it works too! so there are 2 solutions. But if one wants to be more detailed, then he should change it by hand.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: How can I change "return" link? CMSMS news module.

Post by Rolf »

You can also change language string
http://docs.cmsmadesimple.org/customizi ... ge-strings

Grtz. Rolf :)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
PauliusJ
New Member
New Member
Posts: 8
Joined: Wed May 23, 2012 10:50 am

Re: How can I change "return" link? CMSMS news module.

Post by PauliusJ »

Thank you, Rolf!
Post Reply

Return to “Modules/Add-Ons”