Ok, now I know what you mean.
One part can be solved with vlibTemplate, but I think the other is a PHP problem. If you don't know how to do that, you have to go to another forum, because imho PHP, SQL & HTML questions cannot be posted here.
If I understood correctly
- first page = 1 arrow to the right
- next N pages = 2 arrows
- last page = 1 arrow to the left
I would solve this in PHP:
if $row$i == 0
$href = homes1.html
elseif $row$i 0 AND $row$i $last_element
$href = homes2.html
else
if $row$i == $last_element
$href = homes3.html
$href indicates which Template to use or which address to jump to.
How you build $row and get $last_element is a PHP problem.
The template for "homes2.html" could be used to display all contents from
($row[$i] > 0 AND $row[$i] < $last_element)
by creating a loop.
Best regards,
Claus