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.

Paginate without completely reloading page

August 30, 2007 7:57pm

Subscribe [3]
  • #1 / Aug 30, 2007 7:57pm

    How can I switch pages without completely reloading the page if this content is in a sidebar?

    {exp:weblog:entries weblog="distributors" orderby="date" limit="3" sort="dec" paginate="both"}
    {if last-name}<h3>{if first-name}{first-name}{/if} {if last-name}{last-name}{/if}</h3><p>{/if}<br />
    {if business-name}</p><h5>{business-name}</h5><p>{/if}<br />
    <address><br />
    {if address}{if apartment-number}{apartment-number}{/if} {if address-prefix !="-- None --"}{address-prefix}{/if} {if address}{address}{/if} {if address-suffix !="-- Choose a Suffix --"}{address-suffix}{/if} {if suffix-comments}{suffix-comments}{/if}<br />
    {/if}<br />
    {if po-box}P.O. Box {po-box}<br />
    {/if}<br />
    {if city}{city}, {/if}{if state !="-- Choose a State --"} {state} {/if}{if province !="-- Choose a Province --"}{province} {/if}{if zip-code}{zip-code}{/if}</p>
    
    <p>{if country !="-- Choose a Country --"}{country}<br />
    {/if}<br />
    {if office-phone-number}Office Number: <br />
    {office-phone-number}<br />
    {/if}<br />
    {if alt-office-phone-number}Alt. Office Number: <br />
    {alt-office-phone-number}<br />
    {/if}<br />
    {if home-phone-number}Home Number: <br />
    {home-phone-number}<br />
    {/if}<br />
    {if alt-home-phone-number}Alt. Home Number: <br />
    {alt-home-phone-number}<br />
    {/if}<br />
    {if mobile-phone-number}Mobile Number: <br />
    {mobile-phone-number}<br />
    {/if}<br />
    {if alt-mobile-phone-number}Alt. Mobile Number: <br />
    {alt-mobile-phone-number}<br />
    {/if}<br />
    {if fax-number}Fax Number: <br />
    {fax-number}<br />
    {/if}<br />
    {if alt-fax-number}Alt. Fax Number: <br />
    {alt-fax-number}<br />
    {/if}<br />
    {if web-site}Web Site: <br />
    <span class="small"><a href="http://{web-site}">{web-site}</a></span><br />
    {/if}<br />
    {if alt-web-site}Alt. Web Site: <br />
    <span class="small"><a href="http://{alt-web-site}">{alt-web-site}</a></span><br />
    {/if}<br />
    {if email-address}Email Address: <br />
    <span class="small"><a href="mailto:{email-address}">{email-address}</a></span><br />
    {/if}<br />
    {if alt-email-address}Alt. Email Address: <br />
    <span class="small"><a href="mailto:{alt-email-address}">{alt-email-address}</a></span><br />
    {/if}<br />
    </address></p>
    
    <p><br />
    {paginate}<br />
    Page {current_page} of {total_pages} pages {pagination_links}<br />
    {/paginate}<br />
    {/exp:weblog:entries}<br />
    <a href="http://{site_url}distributors">Distributors Page</a>

    Is this even possible?

  • #2 / Aug 30, 2007 8:42pm

    Sue Crocker

    26054 posts

    Are you placing this content in an embed?

  • #3 / Aug 30, 2007 8:49pm

    Its in a side bar. Just a div

  • #4 / Aug 30, 2007 8:54pm

    Sue Crocker

    26054 posts

    Let’s try adding dynamic=off first to your exp:weblog:entries tag. What happens then?

    Do you have a link to where you are using this?

  • #5 / Aug 30, 2007 9:00pm

    I took the dynamic off out and it work fine its just reloading the whole web page in order to display the next page. Is there a way just to flip through them without reloading the whole template.

    http://test.eagleresearchllc.com/faq

    Sidebar on the left midway down that welcomes new distros.

  • #6 / Aug 30, 2007 9:10pm

    Sue Crocker

    26054 posts

    No, I meant put it in. By default, dynamic=on is what is set.

    You might be able to get some jquery/ajaxy thing going on, but that would be more of a howto question.

  • #7 / Aug 30, 2007 9:15pm

    Ok, just added it. the paginate doesn’t work anymore

  • #8 / Aug 30, 2007 10:07pm

    Sue Crocker

    26054 posts

    In that case, take it back out.

    What is the reasoning of having that information, and what is supposed to happen if you click on the links on the left? You have two different exp:weblog:entries on the page, I’m assuming?

  • #9 / Aug 31, 2007 11:45am

    I want to have a list of things in a sidebar. I just dont want the whole page refreshing when they click page two

  • #10 / Aug 31, 2007 1:02pm

    Lisa Wess

    20502 posts

    In order to do what you want, you will need to look into an Ajax type of solution.  What you want, essentially, is to query the database and pull information into the page without an actual page re-load and that is what Ajax can do.  I can move this to how-to if you’d like to get some help with that.

  • #11 / Aug 31, 2007 2:03pm

    Sure you can move it. Thanks

  • #12 / Aug 16, 2008 1:15pm

    Macrike

    137 posts

    Anyone? An AJAX Pagination plugin would be awesome. :lol:

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

ExpressionEngine News!

#eecms, #events, #releases