ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

sorting results by entry ID

May 10, 2011 4:45pm

Subscribe [2]
  • #1 / May 10, 2011 4:45pm

    dodgson

    120 posts

    Hi there, I have a staff section on our site that is divided into 4 categories (maintenance, flight staff, support staff and directors). I currently have all of the results sorted alphabetically by title. Now I would like to have the directors be sorted by entry ID (specific placement). How can I do this when all 4 staff sections are using the same code to pull the results alphabetically?

    Thanks in advance.
    Mark

  • #2 / May 10, 2011 5:39pm

    Mark Bowen

    12637 posts

    Do you mean by 4 staff sections that you have 4 different Channel Entries Tags?

    If so then the only built in way to do this would be to hard-code the entry_id‘s using the fixed_order=”“ parameter.

    Non built in ways would be something like Low Reorder which should allow you to create order-able ‘sections’ that you can then use in your code.

    Hope that helps a bit.

    Best wishes,

    Mark

    P.S. Me being nosy I was wondering what the site is that you’re working on as you mentioned maintenance, flight staff etc… and I’m just wondering is this Light Aircraft or Helicopters or something else?

    Just interested as I’m a Pilot (Helicopter) myself and always like to see Aviation related sites.

  • #3 / May 11, 2011 9:20am

    dodgson

    120 posts

    Hi Mark, Thanks for the reply and sorry for the delay. I have each member entered individually (they each have their own entry ID). I then use the same template for all staff but separate the groups using categories. Is there a way to use an if statement that says something like… If category = directors show them in this order. If so, How would something like this look?

    You’re not being nosey at all. I’m working on getting my pilots license (small aircraft). I’m currently working on my first site using EE. You can see it at http://www.flybfc.com.

    Thanks again for all of your help. It’s very much appreciated.

    Take Care
    Mark

  • #4 / May 11, 2011 10:26am

    Mark Bowen

    12637 posts

    Hi Mark,

    Light aircraft eh? Why not helicopters? 😉 They go backwards as well you know. Much more fun! 😊 although I am obviously biased on that.

    To do what you’re after I can’t off the top of my head think of any built in method as entries can indeed be in different categories and you can show this using the Category Archive Tag but I believe they can only be ordered by date, title, comment or most recent comment so none of those are going to be of use here I’m afraid.

    I am pretty sure though that you should be able to use the Low Reorder module that I linked to above to do this sort of thing though. You would probably be looking at different channel tags for each category hardcoded unfortunately but it could be done in that way.

    I’ll have another think on this and see if I’m missing something obvious. Could well be that I am as I’m currently having a really weird problem on a site I’m creating and can’t for the life of me figure it out so my heads a bit all over the place at the moment.

    I’ll think again though and see if there’s anything else I can come up with.

    Best wishes,

    Mark

  • #5 / May 11, 2011 10:29am

    Mark Bowen

    12637 posts

    Oops meant to say. Very nice site you have going there 😊

  • #6 / May 11, 2011 10:30am

    dodgson

    120 posts

    LOL. Thanks Mark, I’m going to look into your recommendation “Low Reorder Module”.

    How long have you been flying for?

  • #7 / May 11, 2011 10:32am

    dodgson

    120 posts

    Thanks Mark.

  • #8 / May 11, 2011 10:42am

    Mark Bowen

    12637 posts

    LOL. Thanks Mark, I’m going to look into your recommendation “Low Reorder Module”.

    Perhaps get in touch with Lowe about his add-on as he is a really nice, helpful person and I’m sure he may have some more ideas on this too.

    How long have you been flying for?

    To tell the truth I don’t have a very good head for dates although it must have been around 5 years ago when I started my PPL(H). I haven’t done all that much flying for a while now but do like to get in the air whenever I can.

    When I was learning to fly my Wife (Sarah) would come along to the airfield to watch but always said that she wasn’t interested in having a go. One day though my instructor and I said “Come on, have a go!” to which she did and she never looked back.

    In fact it was difficult in getting her to land after that!! 😊

    She is now MD / Chief Flying Instructor / Deputy Head Of Training / FE(H) / GE(H) at Helicentre which is based at Leicester Airport here in the UK.

    The website was made by myself about a year back now and serves them really well so I’m glad about that.

    Best wishes,

    Mark

  • #9 / May 11, 2011 10:48am

    dodgson

    120 posts

    WOW! what a story. I wish my wife was more interested. LOL. It’s probably cheaper if she’s less interested though.  😊 . The site is beautiful. Great job.

    Take Care
    Mark

  • #10 / May 11, 2011 10:53am

    Mark Bowen

    12637 posts

    WOW! what a story. I wish my wife was more interested. LOL. It’s probably cheaper if she’s less interested though.  😊 .

    Yep know what you mean there 😉 When we look back at how much we spent on licenses etc it’s quite scary to think that we ever even had that much money. As helicopters are on average around 2-3 times more expensive to run than aircraft then you can imagine how much we had to spend! That coupled with the high prices here in the UK I sometimes wonder how we didn’t go bankrupt.

    My Wife however is fantastic with looking after the money side of things and can eek out so much from every pound it’s unbelievable.

    The site is beautiful. Great job.

    Thank you. It works well for them and is probably the largest site I’ve ever created so I’m quite proud of it too 😊

    Best wishes,

    Mark

  • #11 / May 11, 2011 11:01am

    dodgson

    120 posts

    I’m sure I’ll be talking to you soon. Have a great week.

    Take Care

    Mark

  • #12 / May 11, 2011 11:04am

    Mark Bowen

    12637 posts

    I’m sure I’ll be talking to you soon. Have a great week.

    No problems. Hope you have a great week too.

    Best wishes,

    Mark

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases