There are several images on each post. All post pages have multiple tags assigned to them.
The archive page shows an overview of all posts with links to the respective post page. A tag cloud on the archive page can be used to filter the displayed posts. For this I used the recipe “Filter collections by tags” from the cookbook, works great.
On the home page thumbnails of all images of all post pages from the archive are displayed. Now I would like to make this overview on the home page also filterable with a tag cloud just like the archive page. Therefore the individual images would have to be assigned the tags of the post from which they originate. I assume.
And again that’s the point where I fail miserably, due to lack of PHP knowledge.
How should the controller for the home page look like?
Thanks in advance for your support!
I don’t get any errors, I can select tags in the tagcloud, the tag is added to the URL - but the content is not filtered after the page load. And the pagination I tried to add doesn’t work. No matter if a tag is selected, all images are always displayed.
I tried to add the pagination to the controller you suggested which led me to this:
If no tag is selected, this “all” tag should be assigned the class “tag-active”. This worked on the archive page, but doesn’t work on the home page. What do I need to adjust to make it work again? Or is there a better solution?
No problem at all. The fact that I get such good support here at two in the morning is absolutely impressive. So it’s totally okay if I have to do some thinking myself