Forum
Help With Portfolio using Categories
So I have a Portfolio using a listing page and detail page. Currently using this to display the listing in the listing page:
<?php perch_content_custom('Portfolio', array(
'category' => perch_get('cat'),
'template' => 'portfolio_listing.html',
));
?>
So that displays everything if I use www.mywebsite/gallery/
Now I want to create a separate listing page to just display a specific category.
I have a category set called 'gallery' and within it 3 categories 'Donation Envelopes', 'Bangtail Envelopes', 'Direct Mail Envelopes'
So tried this:
www.mywebsite?cat=gallery/donation-envelopes/
But none of the portfolio items or their container display, the page container displays.
I just need a way to display a pre-filtered gallery listing.
Does it work if you enter the category path directly rather than via the URL?
If you mean /gallery/donation-envelopes then no
No I mean:
i.e. have you taken some basic steps to find the root of the problem?
If I add that there is no gallery content. So something is wrong with the categories.
I am using an isotope method to display the gallery which uses a class to filter items. So I set up a way to generate the class depending on the category chosen when adding an item.
This is what is in the category_single template:
The in my portfolio_listing template its called using:
This works fine and does the job. However my client wants a link to a pre filtered gallery. I have tried doing this by using a method called hash history but its a bit beyond me. So I thought about using the same template but predefining the category on a link to it and serving an alternate listing template without the filter links.
However it seems there is an error in the category being assigned?
How do I find the error?
Which problem are you trying to solve first?