Mr.Canuck Posted May 12, 2010 Share Posted May 12, 2010 Hey everyone for the following PHP code, I want to pass a parameter which is 'UseAjax=false' Does anyone know how I would write this into the following code? <?php if($this->dtrProducts && $this->dtrProducts->Paginator){ $this->dtrProducts->Paginator->Render(); } ?> Link to comment https://forums.phpfreaks.com/topic/201511-pass-a-parameter-to-php/ Share on other sites More sharing options...
.Stealth Posted May 12, 2010 Share Posted May 12, 2010 And where will the parameter be used? You will need to edit the class. Link to comment https://forums.phpfreaks.com/topic/201511-pass-a-parameter-to-php/#findComment-1057211 Share on other sites More sharing options...
Mr.Canuck Posted May 12, 2010 Author Share Posted May 12, 2010 Thanks for the reply. Basically the parameter will make the "back button" in the browser go back to the last page the user was viewing instead of going back to the first page of the product list. For example: The user is viewing products on page #4 and they click on a product to view it in detail. When they click the back button to go back, it takes then to page #1 instead of page #4. This is the URL of one of the product list pages: http://store.scrapbookingfanatics.com/index.php?c=8 If you click on page #4 and then click on a product to view it and then click the back button in your browser, you will see that instead of taking you back to page #4 it takes you back to page #1 (this is what the paramater will fix). Link to comment https://forums.phpfreaks.com/topic/201511-pass-a-parameter-to-php/#findComment-1057216 Share on other sites More sharing options...
.Stealth Posted May 13, 2010 Share Posted May 13, 2010 Ah i see what you mean. It will need to go in the class then. Can you post up the class? Well, not the full class, just the function, paginator/render(). Nice design btw, is that yours? Link to comment https://forums.phpfreaks.com/topic/201511-pass-a-parameter-to-php/#findComment-1057498 Share on other sites More sharing options...
Mr.Canuck Posted May 13, 2010 Author Share Posted May 13, 2010 Yes, it is our design (my team), Thanks This is all I had to do (turned out to be simple). <?php if($this->dtrProducts && $this->dtrProducts->Paginator){ $this->dtrProducts->Paginator->Render('UseAjax=false'); } ?> Thanks for the responses Link to comment https://forums.phpfreaks.com/topic/201511-pass-a-parameter-to-php/#findComment-1057502 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.