I would like to manually create pagination links like the ones that are automatically created in the prev= and next= links.
The markup would look like this:
<v:php>
function page($id) {
return $pagination_value;
}
</v:php>
<v:collection>
<a href="/press-image/page/<v?= page($id) ?>">Click here for image $id. </a>
</v:collection>
I think a good starting point is to take the attributes of the collection that I am trying to emulate the pagination for:
<v:collection path="press_images" id="press_collection" order="DESC(press/publication_date)" previous="previous" next="next" wrap="true" paginate="1">
</v:collection>
as a vae() function:
$press_images = vae( "press_images", array( "order" => "DESC(press/publication_date)", "paginate" => "1", "wrap"=>"true" ) );
but where do I go from there?
As you may have figured out -- there's nothing really magical going on with the next/previous links when you have a paginated collection. The page numbers just go in order. So, say you have a page called items.html with a tag in it using pagination. You can just browse to http://domain.vaesite.com/items/page/1 or http://domain.vaesite.com/items/page/4 and that will work.
So you can set up your links to link that way.
((Note: This answer describes Vae behavior for new sites. If you want to follow these steps on an older Vae site, you may need to change an option in the Site tab > Optimization tab to disable pagination in the query string.))
For the page you posted up about Press, it sounds to me like what you really want to use is Vae's Permalinks.
Check out http://docs.vaeplatform.com/permalinks for more information.
I have two pages that need to accomplish this. I was able to get the first one working
http://rubykobo.verbsite.com/collections
But the second page is structured slightly differently.
http://rubykobo.verbsite.com/press
It looks like you're new here. If you want to get involved, click one of these buttons!