Page 1 of 1
How can I change "return" link? CMSMS news module.
Posted: Fri Apr 05, 2013 6:07 am
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.
Re: How can I change "return" link? CMSMS news module.
Posted: Fri Apr 05, 2013 9:44 am
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.
Re: How can I change "return" link? CMSMS news module.
Posted: Sat Apr 06, 2013 12:34 am
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>
Re: How can I change "return" link? CMSMS news module.
Posted: Sat Apr 06, 2013 3:20 pm
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.
Re: How can I change "return" link? CMSMS news module.
Posted: Sat Apr 06, 2013 3:37 pm
by Rolf
Did you change the frontend language setting to your language at Global Settings in the admin? The return text should change automaticly...
Re: How can I change "return" link? CMSMS news module.
Posted: Mon Apr 08, 2013 5:34 am
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.
Re: How can I change "return" link? CMSMS news module.
Posted: Mon Apr 08, 2013 12:01 pm
by Rolf
Re: How can I change "return" link? CMSMS news module.
Posted: Tue Apr 09, 2013 5:09 am
by PauliusJ
Thank you, Rolf!