I'd like to create a page template that lists all of a particular content type where a certain value is true.
I assume the best way to do this is to make a custom page template for a collection.
So I follow these instructions here: http://www.uwosh.edu/ploneprojects/docs/how-tos/a-minimalist-view-for-collections
But I get an error "Macro expansion failed" as described here: Page template Macro expansion failed
However the answer there doesn't make sense to me. I'm not sure where to define that macros, is it in the type's .py file?
Does the combination of these two links describe the whole process or is the more to it? I the process described in full anywhere else?
OR am I thinking about this the wrong way, should I not be using a collection, just a new view for the content type that does the sorting itself?
You're getting that error message right after you paste the tutorial's example code into portal_skins/custom/collection_minimal_view, right?
That's because Zope is trying to anticipate what you're doing, but it doesn't know what the variable 'context' is going to be and it can't be sure 'context' will have a 'standard_view' attribute.
At any rate, if you ignore the error message, and follow the rest of the tutorial the new view does in fact work.
However, it isn't best practice to keep long term customizations in the custom folder, or really portal_skins, for that matter. A better approach would be to put the template in a package and register in your ZCML with: