Hey everybody,
I'm struggling through my first Drupal6-project (though i've got some experience with 5) and I can't google my way to fixing this. I'm making a portfolio with several clients. These clients got several cases and inside these cases there several files to show. I want to show only one file at a time and the user should be able to click trough these files and go to the next case (of this client). I've already made this happen with a view using arguments like this:
site.com/cases/ClientA/0
This will give the first case of client "ClientA" and will show the first file of this case. It's already possible to switch to the next case of this client, using the build-in pager, which gives this link:
site.com/cases/ClientA/0?page=1
This is great. The major problem is.. if a user is watching file #4, the pager-link to go to the next case will be:
site.com/cases/ClientA/4?page=1
That works, but the first file the user will see is #4 instead of #0. To fix this, I want to change the pager that it will always (if used in Cases) gives this url:
site.com/cases/ClientA/?page=1
IS THIS POSSIBLE? :D And how should I do this?
Any info is greatly appreciated.
Jasper.
Comments
Comment #1
jhaggenburg commentedOk, I did some more searching and I manage to alter theme_views_mini_pager(). It seems like I have to change these variables, but I don't know how:
$li_previous = theme('pager_previous', (isset($tags[1]) ? $tags[1] : t('‹‹')), $limit, $element, 1, $parameters);
$li_next = theme('pager_next', (isset($tags[3]) ? $tags[3] : t('››')), $limit, $element, 1, $parameters);
instead of "?page=" I wanna use "./?page=". Is this the place to do that?
Comment #2
jhaggenburg commentedFinally I went for another approach. Just one argument for the current case and all the info about the other cases of the same client are loaded in the tpl.php-file. It was a bit of a hassle, but it's working now :)
Comment #3
merlinofchaos commentedYou might look into custom_pagers module for a different approach.