We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum
Output from multiple collections using different templates
Following on from my previous thread: http://forum.grabaperch.com/forum/08-25-2017-suggestions-multiple-collections-or-single-collection-approach
I have ran into a little roadblock that I can't seem to figure out.
I have two collections setup, one named articles and one named testimonials. The articles collection uses an article based template with the standard fields you would expect, title, image, body, summary, date. The testimonials collection uses a template with fields including testimonial and name.
I can't seem to figure out how to output the items in date order using the two different templates.
Using the following function, I did manage to output both collections when they both used the same template.
perch_collection(['Articles','Stories'], [ 'template' => 'list.html', 'sort' => 'date', 'sort-order' => 'DESC' ]);
Want to reply to this thread?Login with Perch