I want to add next and previous buttons to my blog page template so if someone goes to my template page they can move forward or backward the same way they can on my non-templated blog page which has the pagination feature built in.
I read the following Forum Entries featuring @hammerhouse’s guide tutorials:
I followed the instructions as best I could, but it turned out pretty disastrously. When I published the site my entire blog content disappeared, except for the name of the current post. At first, there were no buttons in sight either, but I commented out the code to correct that. So now the buttons show, but the linking doesn’t function. I redid this numerous times but the result remains the same.
In the designer view, there is a long list of post titles. I don’t want that on my page. I just want two buttons that go to my next and previous posts.
So I have questions for anyone who is kind enough to respond:
Should I have created a new collection list “Dynamic Lists” or do I use my current Blog Post collection (which is what I tried)? If I need to create a new collection exactly what collection fields do I include.
When I added a text link to my “Dynamic Item”, set the link to Current Post
and set the text to the post’s Name field. There was a long list of my blog title names. Is this what should happen? Not what I wanted.
Then I was to add IDs to buttons. What buttons. Are these just randomly placed at the bottom of the page? This is what I did and gave each button it’s proper ID.
The rest I was able to follow. There was a link to an example but that no longer works.
Please help someone. I really don’t want to have to manually place links on each collection page. I like the fact that this allegedly does everything automatically.