How can I get access to the query string? or how could I do pagination?

Torey Heinz's Avatar

Torey Heinz

15 Oct, 2010 08:16 AM via web

How can I get access to the query string? or how could I do pagination?

  1. 2 Posted by John Nunemaker on 15 Oct, 2010 04:06 PM

    John Nunemaker's Avatar

    Currently there is no way to paginate. What are you needing to do?

    On Fri, Oct 15, 2010 at 4:18 AM, Torey Heinz <
    ***@tenderapp.com<tender%***@tenderapp.com>
    > wrote:

  2. 3 Posted by Torey Heinz on 15 Oct, 2010 07:06 PM

    Torey Heinz's Avatar

    This is what I would like to do
    http://commhomesales.com/homes-for-sale/logan-estates/?page=3

    {{ item.data.per_page | times: item.params[:page] | assign_to: 'offset'}}
    {% for home in item.children limit: item.data.per_page offset: offset %}
      {% include 'home_intro' for home %}
    {% endfor %}

    But obviously what I don't have is anything like item.params

    If there where some way you could expose rack.request.query_hash I think I could do pagination.

    I am actually think about creating a 'folder' under logan-estates called page, and then creating like 10 pages under that, so could grab {{ item.path | split | last }}

  3. 4 Posted by John Nunemaker on 17 Oct, 2010 09:54 PM

    John Nunemaker's Avatar

    The link did not work for me. It sounds like you maybe need a little more
    flexibility than we currently have. You want to be able to store homes and
    then paginate through them, correct? Currently with pages it is all or
    nothing.

    The way you are wanting to do it now will not work even we exposed the
    params to you as the page caching we employ does not work with query
    strings.

    We definitely want to support this type of use case, right now you will have
    to work around it though by doing JavaScript pagination or none at all.

    On Fri, Oct 15, 2010 at 3:08 PM, Torey Heinz <
    ***@tenderapp.com<tender%***@tenderapp.com>
    > wrote:

  4. 5 Posted by Torey Heinz on 17 Oct, 2010 10:05 PM

    Torey Heinz's Avatar

    Ah, I forgot about page caching.

    The link wasn't real sorry about the confusion.

    No worries, we'll work around it.

    The thrill of image re-sizing is enough to make me overlook this minor
    issue.

    On Oct 17, 2010 5:59 PM, "John Nunemaker" <
    ***@tenderapp.com<tender%***@tenderapp.com>>
    wrote:

  5. 6 Posted by John Nunemaker on 17 Oct, 2010 10:47 PM

    John Nunemaker's Avatar

    Ha! Glad to hear you are excited about it.

  6. Steve Smith closed this discussion on 16 Nov, 2010 02:51 PM.

Comments are currently closed for this discussion. You can start a new one.

Recent Discussions

17 May, 2012 10:45 PM
20 Mar, 2012 05:05 PM
26 Apr, 2012 01:40 AM
07 Mar, 2012 04:42 PM