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.

Pagination and limit incorrect when conditionals are used

November 29, 2010 5:32am

Subscribe [2]
  • #1 / Nov 29, 2010 5:32am

    joelene

    87 posts

    When I set a limit in a paginating weblog tag and use a condition to show only certain elements it naturally thows off the pagination.

    I want to show only entries from one member group and am filtering the results using

    group_id=”{specific_member_group}|6”

    where the 6 is the member group id of a global contributor - the entries from member_group 6 are only needed including if they are “sticky” as designated by a dropdown in the publishing area (ie set to “yes”).

    I have tried using search:is_sticky=“yes” which only returns those which are sticky and ignores the group_id=”{specific_member_group}” - is there a way to search for the member_group in conjunction with the is_stick=“yes”

    or will this need a query or some php to make it work properly?

    Thanks 😊

    Moved to CodeShare Corner by Moderator

  • #2 / Nov 29, 2010 7:39am

    Sue Crocker

    26054 posts

    Hi, Joelene. How about trying two different exp:weblog:entries loops? One with just the sticky entries and one without? That might not work either… your best bet would be to use the query module after all.

  • #3 / Nov 29, 2010 8:33am

    joelene

    87 posts

    would the pagination handle both weblog loops inside the one pagination tag? That would be fantastic 😊 Haven’t tried that.

    Not quite sure how to use the query module to achieve this but with luck I won’t have to - thank you Sue, I may be in back in touch soon I feel….

  • #4 / Nov 29, 2010 8:39am

    Sue Crocker

    26054 posts

    Unfortunately it won’t.. you’d still need to use the query module. How much do you need to return? Is the title sufficient?

  • #5 / Nov 29, 2010 8:43am

    joelene

    87 posts

    No I am guessing that I would need to check for a custom field entry in a specific member group, ie the is_sticky custom field, I think i know how to retrieve this… but not entirely sure how to go from there.

    Ah well.

    Thanks for your help

  • #6 / Nov 29, 2010 8:52am

    Sue Crocker

    26054 posts

    But once you get the entry_id, what else do you need to display on the screen? The exp_channel_titles has what you need in there, but it doesn’t cover any custom fields, you’d have to join to the exp_channel_data table as well. Except just checked, it doesn’t handle group_id. So the query would be a bit more difficult (but not impossible) to grab.

  • #7 / Nov 30, 2010 7:05am

    joelene

    87 posts

    What I could really use is a way of outputting the current publishers group_id to a custom field in the publishing page - that way each admin group would automatically have their group_id in a field when they create an entry - do you know if there is a way of achieving this through a plugin/extension?

    Something like this perhaps…

    http://leevigraham.com/cms-customisation/expressionengine/lg-member-list/

    Thanks in advance 😊

  • #8 / Nov 30, 2010 9:54am

    Sue Crocker

    26054 posts

    Not that I’ve seen. You might want to see if Leevi is interested in creating one.. moving to CodeShare Corner for additional community support.

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

ExpressionEngine News!

#eecms, #events, #releases