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
http://ee:8888/index.php/artists/view/joebloggs/P2/P2/P2/P2/
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.
paginate_base=”site/index”
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….
What website you using EE for? I’ve been using it on a rather large project for the past few months and I have some serious mixed emotions about it, can be hella frustrating at times.
Hey bro, well at the moment using it for an arts organisation in Glasgow but will be using it for a large property development company most likely in the near future.
What sort of things are you not feeling?
When I’ve been building templates sometimes it feels like the templates are too closely related to the content, like custom fields and things like that. Almost as if every time you add a new ‘weblog’ you have to create a template for it. Would be nice to just have a set of default templates that you can assign to a weblog. Maybe you can, I’ve not figured out how to do that yet.
I’ve just had to move an EE install to another server. I had around 12 different locations to update paths. WTF is wrong with having paths stored in a config file? *sigh*
In regards to templates being too closely related to content. I did not like that either, using the STRUCTURE module it’s the other way around, content is related to templates rather than how ee defaults it. Might want to check it out.