Forum
Gallery App or Content Templates?
I want to create a portfolio where the index page has the option to filter by type. The index will be thumbnail images perhaps with a heading and caption. Clicking on an image or link will take you to a detail page which will have more images and some text (its an agency portfolio).
Is this best done with the Gallery app or manually using templates and perch_content_custom?
What is the main advantage of using the Gallery app?
Or would I be better off using the Blog app for this?
See if this example helps: https://docs.grabaperch.com/video/v/portfolio-with-categories/
Okay thats very helpful, just to be clear is this without using the gallery app? It looks like how I did a blog for a client before you brought out the Blog app.
PS: Just want to say Perch is really coming along now. I think the last thing that would really be worth investigating is a small cart inside Perch with a set of default templates as starters.
I know you have the Foxycart option but for those that want to keep customers on site and costs down its not the ideal solution. I have used Opencart for a full blown shop but for smaller sites with only a few items like say a band site its a bit overkill.
PPS: The documentation is getting a lot better so well done for that!
Correct, that's not using the gallery app.
Thanks, which is the best way in your opinion and can both routes make use of Categories?
Are there any sample templates for the listing and detail are these in the quill folder or somewhere else?
I wouldn't use Gallery for this.
List/detail instructions and sample templates here: https://solutions.grabaperch.com/architecture/how-do-i-create-list-detail-pages
Okay thanks for confirming and thanks for links.
Studied the link on portfolio but struggling to work out which templates to put what based on my intended implementation. I read and re-read and think I am struggling with which templates control what.
Any chance you could look at https://dev.marketingalchemy.co.uk/portfolio and the subsequent link it takes you too for the detail page?
I need to figure out what to put in what template and how to get that menu of categories on the listing page.
I'm not sure what you're asking.
Have you looked at the test list and detail page?
Yes, but I don't know what I'm looking for.
I don't know - you built it, not me! If you turn debug on, Perch outputs the name of the templates being used, so that might help.
Where do you want to display them? I don't know anything about how you've constructed that page. You're the only person in a position to answer these questions.
I don't know what you want to do.
Okay let me clarify.
I have an index page portfolio.php, this displays a grid of thumbnails for the portfolio items, there are filter links above to filter by category. Clicking on an item takes you to a detail page.
Currently this is all a static html file just to show the intended layout.
I have experimented a bit on another page https://dev.marketingalchemy.co.uk/portfolio-test however not sure I have it right.
I have this inside my portfolio.php file
Does this look about right?
And how do I add (and inside which template listing or item):
I can't build your site for you piece by piece. That's not what support is for.
If you need help building your site, perhaps seek advice from one of our registered developers.
https://grabaperch.com/developers/
I am not expecting you to either. Its just I find it hard finding the relevant info on these functions. While the Portfolio link is useful and I have made some headway, its those 3 things I need pointing to where the info is on the hooks to get this data.
Okay I have made some progress, looking at your docs for pagination it seems to offer the Prev/Next and page 1 of xx, is there a way to just have 1 2 3 4 etc?
Also how do I filter the listing page by category?
We call those 'page links' - check the options at the bottom: https://docs.grabaperch.com/docs/templates/pagination/
Using your two page solution for list/detail https://solutions.grabaperch.com/architecture/two-page-list-and-detail
Works fine.
I have tried the mod rewrite rule to make my current path of portfolio/detail.php?s=xxx clean
RewriteRule ^portfolio/([a-zA-Z0-9-/]+)$ /portfolio/detail.php?s=$1 [L]
But this does not seem to work, what have I done wrong?
How does it fail?
The links stay as portfolio/detail.php?s=xxx
To clarify I have portfolio.php and detail.php using the method explained in your tutorial for separate list/detail pages.It works fine, just cannot get the clean url htaccess to work, yet the same method works for the blog.
The rewrite rule in your htaccess will enable the clean URL to match your pages. It won't change the links output in your HTML. You need to do that via the templates.
Thanks I made the link href="<perch:content id="slug" type="slug" />" and it now works.