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 Bug?

January 14, 2011 7:30pm

Subscribe [5]
  • #1 / Jan 14, 2011 7:30pm

    Brad Parscale

    196 posts

    Hello,

    To me this appears to be a bug. Say I want to have content on a page. A list of locations. However, I also want to call the same dynamic content in the head for Javascript to use in a dynamic Google Map.

    Currently ExpressionEngine 2 requires

    
    
    

    To make it work!!!

    Why must I hide {pagination_links} to get the pagination to fire? Isn’t this what NOT disabling Pagination should do?  What is the use of disabling pagination if it doesn’t fire anyways unless you have pagination variable pair in there. What is even worse, is {paginate}{/paginate} will not fire if nothing is inbetween the pair.

    Is this a bug, I believe so?

    Looking for some second opinions though. Thanks!

    Brad

  • #2 / Jan 15, 2011 3:37pm

    Greg Salt

    3988 posts

    Hi Brad,

    I’m sorry, I’m unclear about your post. Can I clarify this; you have the code above in the HTML head and your main content tag has pagination and you find that you have to add the pagination tag pair but then hide the pagination_links in order for the tag in the head to output the correct entry data. Is that correct?

    Cheers

    Greg

  • #3 / Jan 15, 2011 7:33pm

    Brad Parscale

    196 posts

    This is exactly correct.

    Why must I hide pagination links to make pagination work. What is the use of disable=“pagination” if it is automatically disabled if you don’t have pagination_links in your entries loop?

    Brad

  • #4 / Jan 16, 2011 4:55pm

    Greg Salt

    3988 posts

    Hi Brad,

    The channel tag does require that the paginate tag is in your template otherwise the pagination code is not run. The paginate parameter is not necessarily required since it will always default to “bottom” unless disable=“pagination” is set.

    Cheers

    Greg

  • #5 / Jan 16, 2011 4:57pm

    Brad Parscale

    196 posts

    So you do not need to put disable=“pagination” if you don’t have pagination links then?

    I really don’t see where it is documented that you must have pagination_links if you want to show dynamic pagination from more then one entries loop.

    Brad

  • #6 / Jan 17, 2011 9:22am

    Sue Crocker

    26054 posts

    Hi, Brad. No, you don’t need to disable pagination, but it doesn’t hurt to do so, if you don’t specify the {paginate}{/paginate} loop, but maybe I’m misunderstanding what you’re trying to do..

  • #7 / Jan 17, 2011 10:35am

    Brad Parscale

    196 posts

    Hello Sue,

    I am confused why I MUST have to show not only {paginate}{/paginate} but some variable in between to get the dynamic content to show. What if I want to show pagination without pagination links? For example, putting and entries loop in the head for javascript.

    Now, that being said it appears that disable=“pagination” really doesn’t mean anything since it appears pagination is disabled by just not putting a pagination variable.

    Why not just allow the loop to show pagination if disable=“pagination” is not there. I see no purpose for this disable now..

    Brad

  • #8 / Jan 17, 2011 4:51pm

    Ingmar

    29245 posts

    I am confused why I MUST have to show not only {paginate}{/paginate} but some variable in between to get the dynamic content to show.

    Because it’s been programmed that way, I am afraid. If you’re leaving the tag pair empty EE assumes that you don’t want pagination after all.

    Now, that being said it appears that disable=“pagination” really doesn’t mean anything

    Disabling does actually reduce the pagination related queries to the database. The reverse is not automatically true, just because you’re querying for pagination doesn’t mean you have to use it.

    Why not just allow the loop to show pagination if disable=“pagination” is not there.

    Sounds like a good Feature Request to me if you’d care to make one.

  • #9 / Jan 17, 2011 8:41pm

    Brad Parscale

    196 posts

    Hello Ingmar,

    I am not seeing this in my tests:

    “Disabling does actually reduce the pagination related queries to the database”.

    In reality it appears EE checks for pagination first then skips it.

    This is why I don’t actually understand the feature disable=“pagination”. It currently has zero use. By leaving it in the documentation you are applying that disabling it as actually saving queries.

    To me it appears in trying to optimize ExpressionEngine a developer figured that it could look for the pagination and then skip it if not there. I don’t think that developer really thought, “Maybe they are using the entries loop more then once”.

    So I guess again I ask, is this a feature or a bug?  To me it is just weird.  If it is a feature request, how would I ask for this? enable=“pagination” ?

    Brad

  • #10 / Jan 18, 2011 4:42pm

    Ingmar

    29245 posts

    So I guess again I ask, is this a feature or a bug?

    I would think “feature request”. How to ask for it? Just point to this thread or explain in a short paragraph.

  • #11 / Jan 18, 2011 4:45pm

    Brad Parscale

    196 posts

    I understand the physical ability to make a feature request. I was asking what should I actually ask for?

    “Can pagination work as it is in the documentation?”

    Brad

  • #12 / Jan 19, 2011 12:00am

    Brad Parscale

    196 posts

    So this will not work then:

    {paginate}
    {embed="shop/.paginate"}
    {/paginate}

    Curious if this is considered a bug?

    Brad

  • #13 / Jan 19, 2011 3:40pm

    Barry Cogan

    291 posts

    Hi Brad,

    disable=“pagination” will prevent the tags from being parsed. If you leave out this disable then you will get pagination if you include the tag pair along with the relevant variables like pagination links.  It does work as described in the documentation. If I am missing something if you could please link to the exact code you use plus the place in the documentation which conflicts with how it works we will be happy to explain or identify whether the docs are flawed or not.

    {paginate}
    {embed="shop/.paginate"}
    {/paginate}

    This code is not considered a bug. You can’t embed templates within tags. Embeds are considered template elements, not tag elements.
    If you are just trying to pass a small snippet of information, then a user defined global variable would be far more appropriate.

    There are exceptions to this with the ability to pass variables via embeds.

    Best regards,
    Barry

  • #14 / Jan 19, 2011 5:35pm

    Brad Parscale

    196 posts

    Thanks Barry,

    I guess what I am truly try to get at is that I would expect paginated content (paginate queries) to work if I DONT have paginate=“disable” in.

    Would you not?

    Brad

  • #15 / Jan 19, 2011 5:53pm

    Barry Cogan

    291 posts

    Correct.

    If it is NOT disabled it will work, providing you have the tags in the template.

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

ExpressionEngine News!

#eecms, #events, #releases