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

  • 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>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.