I have a specific problem regarding my website that I built with HTML, CSS, Masonry, and a little bit of PHP.
On my homepage, You can see that I am using JQuery Masonry to display my work. Every time I add a project, the layout is reordered quite a bit, as expected. It is very hard to predict where certain projects will land in the grid (since the height varies from project to project).
After you click an image, you are taken to the project page, with a project navigation at the top (Previous Project / Next Project). There is no fancy PHP or CMS going on here. I manually update the prev and next project links whenever I upload a new project. This usually means updating links on every project page (18 pages). I do this because when masonry rearranges the project grid on the homepage (after adding a new project), the prev and next project links will be out of date and will not be correct. For example, after uploading a new project, when I click “next project” it will take me to the incorrect project because the grid on the homepage is different than it was before.
I order the images from left to right, starting on the first row.
I would like to have a PHP include for the project navigation, but I do not know PHP very well. The code would achieve something like, “after clicking on the next project link go to x project”
Ok here is the most basic PHP pagination tutorial I could find. It doesn’t even use a database, just an array:
Array Pagination in PHP
Although I suspect you would be helping yourself a great deal if you sat down for a day and learnt the basics of PHP scripting. It’s quite a simple first language:
PHP – A simple tutorial