I’ve been using Expression Engine for a good few weeks now and the sites that I’m working on are getting progressively more complicated. One issue I ran into recently was using embedded templates which also had paging enabled.
For example I have an Artists page. The main content on the page is in the left hand column which shows all details relating to a single artist. The right hand column is an embedded template with shows a paged list of all artists that the user can page through.
The problem I had was when clicking an event in that sidebar for the first time you were taken to a new page with that artist’s details in the left hand column and the paged listing of artists in the right hand column. Clicking again on another artist in that column created a problem whereby the page number was being appended to the URL and not updating the artist with the newly selected one.
For example I was getting
What I wanted was
The only way I could get what I wanted was to some how overwrite the pagination links Expression Engine was giving me. After a lot of searching and questions on the official support forums I found a solution.
That solution is the paginate_base= tag.
This tells ExpressionEngine to override the normal pagination link locations and point instead to the explicitly stated template group and template.
Jah Bless! I could now change the generated pagination paths to get paging working correctly in an embedded template.
Also, make sure dynamic_status= is set to “off” in the embed statement for your template.
My journey continues….