Jump to content

server//index.php?option=com_wrapper&Itemid=38 PREV / NEXT question


bono_head

Recommended Posts

Hi there!

 

I have this wrapper thingy going on my website. They all have end with a number. From what I can see, the numbering is consistent.

 

My question is this:

 

How can I get the last number for my previus next button? if Itemid=38 then previous = server//index.php?option=com_wrapper&Itemid=37 and next = server//index.php?option=com_wrapper&Itemid=39 ?

 

I used to program in PHP in the old days (few years ago), but I am rusty as h*ll... Can someone help me with this? And also tell me; When does it come back to me?  :)

Link to comment
Share on other sites

ok if there will always be a option then you can use this code:

 

Next Button:

<?php
$var = $_GET[itemid]++;
echo("<a href=\"index.php?option=$_GET[option]&Itemid=$var\">Next</a>");
?>

 

Previous Button:

<?php
$var = $_GET[itemid]--;
echo("<a href=\"index.php?option=$_GET[option]&Itemid=$var\">Previous</a>");
?>

Link to comment
Share on other sites

I don't think this code is working the way I want it to.

 

How can I get ONLY the last number of the website-address?

 

It consists of text and numbers.

 

AND the prev / next will be in another frame. It will have to make the main menu page to prev next.

 

Sorry for my bad explaining

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.