1

I'm wondering if someone can help me, or maybe point out a good plugin/extension.

I need a return to previous page button, but I need to insert it as a menu item, does anyone know of a way to achieve this please?

thank you

2

I don't know of any extension that does this for you, but you can use Javascripts history.go(-1) feature which will do the same as clicking the "back" button on your browser.

To add a menu menu item, I would normally suggest using Joomla's Menu Manager, however it won't be the most dynamic method in your case. Therefore I'd suggest using jQuery for this, like so:

jQuery(document).ready(function($){

    $('.menu').prepend('<li><a href="javascript:history.go(-1)">Back</a></li>');

});

You will of course need to change .menu to the class or ID that is associated with your menu's UL tag.

Hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.