Prev and next links

This is showing up the "prev" "pagenumber" "next" links below the albums.

`

<?php printPageListWithNav("« prev", "next »"); ?>

`

how can I add an
`

rel="ajaxcontent"

`

to those displayed links?

Thank's

Comments

  • Do a search for "function printPageListWithNav(" without the quotes in template-functions.php. You can add it to the output there.
  • no64 Member
    Do you mean this part:

    `function printPageListWithNav($prevtext, $nexttext, $nextprev=true, $class="pagelist", $id=NULL) {

    echo "
    ";

    $total = getTotalPages();

    $current = getCurrentPage();

    echo "n

      ";
      if ($nextprev) {
      echo "n
    • ";

      printPrevPageLink($prevtext, "Previous Page");

      echo "
    • ";
      }
      for ($i=1; $i <= $total; $i++) {<br />
      echo "n
    • ";

      printLink(getPageURL($i), $i, "Page $i" . (($i == $current) ? " (Current Page)" : ""));

      echo "
    • ";
      }
      if ($nextprev) {
      echo "n
    • ";

      printNextPageLink($nexttext, "Next Page");

      echo "
    • ";
      }
      echo "n
    ";

    echo "n
    n";

    }`

    Where do I have to insert it?

    Is it possible to do this in the index.php or album.php of a theme?
    Or can I create that menu by myself ?
  • I believe you will need to make the following change to the top of that function: echo "<div" . (($id) ? " id=\"$id\"" : "") . " class=\"$class\" rel=\"ajaxcontent\">";

    There is no other way to do this in the index.php or album.php that I know of.
  • no64 Member
    Well, I can't get it to work.....so there is no way to set up a "prev" and "next" manual so I can create a "href" with that "rel" inside?
  • acrylian Administrator, Developer
    Yes you can do that. Use these functions, they return only the link:
    getNextPageURL()
    getPrevPageURL()
  • *edit this forum does not render the code properly.
    sry dude
  • no64 Member
    acrylian....could you please give me a complete code line - I have that little understanding in php, it is shameful
  • acrylian Administrator, Developer
    That's not shameful. I am not that great php programmer myself, but this is quite easy:

    `

    ">previous

    `
  • no64 Member
    Thank's , I'll try it right away
Sign In or Register to comment.