Keyword

Change the "back to top" to "back to previous"??

  • vinson chan
  • vinson chan's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #59194 by vinson chan
i find the "back to top" item in /components/com_k2/templates/default/item.php

below is the code
<div class="itemBackToTop">
                <a class="k2Anchor" href="<?php echo $this->item->link; ?>#startOfPageId<?php echo JRequest::getInt('id'); ?>">
                        <?php echo JText::_('K2_BACK_TO_TOP'); ?>
                </a>
        </div>
I want to change back to top function to back to previous, I try to use
$_SERVER
but can't be work, please help.................

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

More
12 years 10 months ago - 12 years 10 months ago #59195 by Tracey
Hi,

Are you looking to just change the text or make a link that will take you to the previous page?

Either way, if you are trying to just change the text you will need to do a language override. Go to your language folder, open it and you should see an override folder inside that you will see a override file. Add: K2_BACK_TO_TOP="back to previous" to that file .

As far as giving the link the ability to go to previous page I'm not sure how to write that in php but you could try the following,

Replace this:
					
Joomla! v3.5.1
Gantry5 - Hydrogen Template
k2 v2.7.0

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

  • vinson chan
  • vinson chan's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #59196 by vinson chan
Tracey ,

thanks a lot, it is work , thank you very much.......... :)

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


Powered by Kunena Forum