0

I have a channel full of product entries. I have a checkbox custom field to mark a product as "popular". I want all "popular" products to display first in the list, like they are "sticky". But I don't want to use the default "sticky" option. Can I display all entries marked with "popular" custom field, then display the rest?

And i know I can use 2 channel entry tags, just trying to avoid it if possible.

2

http://ellislab.com/expressionengine/user-guide/add-ons/channel/channel_entries.html#orderby

You can order by custom fields in the channel entries tags. It might mess up the order of the remaining entries though.

3
  • yea, I've been playing with those options, but I can't quite configure it to display the entries how I want. I want Ascending order, just want to show the "popular" entries first. If I do something like sort="asc" orderby="product_popular", my popular entries, which I added last, are still at the bottom of the list. – Mike Lohrman Jul 22 '14 at 15:35
  • My "product_popular" value is "Yes" or nothing, whatever nothing registers as. – Mike Lohrman Jul 22 '14 at 15:45
  • have you tried sorting by "dsc"? – Johnathan Waters Jul 22 '14 at 17:24
0

I have to do some more testing, but i think I got it with this...

sort="dsc|asc" orderby="product_popular|title"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.