Keyword

Back button in K2 item - multi language

  • Marco Ferracuti
  • Marco Ferracuti's Avatar Topic Author
  • Offline
  • New Member
More
7 years 8 months ago #160168 by Marco Ferracuti
Back button in K2 item - multi language was created by Marco Ferracuti
Hello,
I have to add a "Back" button inside each K2 item.

For a single language site I would have solved it easily adding the code below to "item.php" in my k2 subtemplate:
<FORM><INPUT Type="button" VALUE="Back" onClick="history.go(-1);return true;"></FORM>

This works for a single language site...
My problem is that I can't write the right code to call a label to replace VALUE="Back" in order to get a multi-language translation.


Can anybody help me?

Thanks a lot for any help.
have a nice day
Marco

Please Log in or Create an account to join the conversation.

  • Marco Ferracuti
  • Marco Ferracuti's Avatar Topic Author
  • Offline
  • New Member
More
7 years 8 months ago - 7 years 8 months ago #160201 by Marco Ferracuti
Replied by Marco Ferracuti on topic [SOLVED] Back button in K2 item - multi language
Hi, thanks to Krikor I have solved my issue,

here is the code that I have added to "item.php" file inside my K2 sub-template folder:
<FORM class="yourclass"><INPUT Type="button" VALUE="<?php echo JText::_( 'Back' );?>" onClick="history.go(-1);return true;"></FORM>

Then I added the language override to translate the 'Back' string.

It works for me on joomla 3.6.5 and K2 2.7.1

Thanks Krikor for the precise hints!

Best
Marco
Last edit: 7 years 8 months ago by Marco Ferracuti. Reason: typing errors

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 7 months ago #160240 by Krikor Boghossian
Replied by Krikor Boghossian on topic [SOLVED] Back button in K2 item - multi language
You 're welcome buddy :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum