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 Answers 2

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. Jul 22, 2014 at 15:35
  • My "product_popular" value is "Yes" or nothing, whatever nothing registers as. Jul 22, 2014 at 15:45
  • have you tried sorting by "dsc"? Jul 22, 2014 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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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