Jump to content

Joomla: Go back on previous itemid pagePosted: Wed Jul 15, 2009 11:21 am


habib009pk

Recommended Posts

Dear Friends

 

I have a little problem, i want to make a back button on the content pages which will go backward to the previous itemid page, and this process should be dynamic. Is there any code to put on the link for going in backward direction.

 

I am working in joomla 1.5.10

 

Thanks and Best Regards

Link to comment
Share on other sites

  • 1 month later...

<?php
    // Get Previous Page Itemid
    $parameters = end(explode("?",$_SERVER['HTTP_REFERER']));
    $parameters = explode("&",$parameters);
    foreach ($parameters as $parameter)
        if (substr($parameter,0,6) == "Itemid")
            $Itemid = substr($parameter,7,strlen($parameter)-7);
?>

 

OR

 

$link = $_SERVER['HTTP_REFERER'];

 

OR

 

<a href="javascript:history.go(-1)">Back</a>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.