How can I order entries for listings page?
Hi,
I have a page that lists different kinds of labs (university website) and want to be able to change the order in which the listings appear.
When I add an entry using Structure, it appears at the top of previous entries rather than being added to the bottom. The listings are in a separate weblog embedded in the labs page. The code is very simple:
<div class="entry-content">
{body}
{embed="degrees_programs/lab_entries"}
</div><!--// entry-content-->
Sorry if this is an EE question and not a Structure question. First-time user. I'm using EE 1.6.8 and Structure 2.0.7
Thanks.
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Travis Schmeisser on 28 Jul, 2011 09:32 PM
My favorite method is to use Playa for ordering listings. You can add it as a field on the page holding the listing and they can drag them into the panel to make them part of the live list and you can order by the custom Playa order. Clients love it!
3 Posted by Jeanne Prine on 28 Jul, 2011 09:37 PM
Excellent! Thanks very much. I never would have thought of that even though I've got Playa installed.
Will go try it now.
4 Posted by Jeanne Prine on 28 Jul, 2011 10:06 PM
I set up the Playa field and dragged and dropped to order the entries but the changes aren't showing up on the page even after I cleared the browser cache and EE cache. Did I skip a step or miss something? Thanks.
Support Staff 5 Posted by Travis Schmeisser on 28 Jul, 2011 10:08 PM
You have to add a param to your playa tag to use the custom order. Check their docs I can't recall what it is off the top of my head.
6 Posted by Jeanne Prine on 28 Jul, 2011 10:14 PM
Okay, thanks--will look at their docs.
7 Posted by jprine on 29 Jul, 2011 03:10 AM
Got it now. This code works:
' {exp:weblog:entries weblog="lab_entries" dynamic="off" orderby="entries" sort="asc"}' where 'entries' is the name of the Playa custom field. Found what I needed in the EE 1x user guide under Weblog Entries Tag Parameters order by custom field.
Thanks again!
Support Staff 8 Posted by Travis Schmeisser on 29 Jul, 2011 03:13 AM
Awesome!