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 not showing on pages

August 10, 2011 5:24pm

Subscribe [3]
  • #1 / Aug 10, 2011 5:24pm

    Creative Cycle

    5 posts

    This question may be related to a resolved thread.

    Hi I am very new to expression engine and coding in general and I need to paginate some list on my site. http://biba.bb/index.php/news-center/presentations/ is one such page.

    I had a developer put together the site for me in EE but now I am learning it and I want to make a few updates to the way the pages flow.

    I want the list to paginate after 10 entries here is the code I am using. I tried putting this in every which way I just can’t get it to work, do I have it placed wrong?

    {if segment_2 !=""} >{exp:channel:entries channel="{my_channel}” url_title=”{segment_2}”  limit=“1”}
    {paginate}
    {title}
      {if {total_pages} > 1}
    Page {current_page} of {total_pages} pages {pagination_links}
              {/if}{/paginate}
     
    {/exp:channel:entries}

  • #2 / Aug 11, 2011 5:46am

    John Henry Donovan

    12339 posts

    Hi Creative Cycle,

    I think you may have a rouge curly brace in your code so check that first.I can see it appear as the page loads.
    Is there another Channel Entries tag in that template. The one above does not look like the one that is generated the list on your site.The one above looks like it is inside a conditional to display on a single entry page. If you need to then please share some more of that template with us. Use the

    This would be how typical pagination is set up

    {exp:channel:entries channel="{my_channel}"  limit="10" paginate="bottom"}
    <h1>{title}</h1>
    
    {paginate}
    Page {current_page} of {total_pages} pages {pagination_links}
    {/paginate}
     
    {/exp:channel:entries}

    Does that help?

  • #3 / Aug 11, 2011 2:20pm

    Creative Cycle

    5 posts

    Hi John,

    I’m afraid I am totally lost here.

    Here is the full template. I took out my failed attempts at pagination. Where do I put the pagination code?

    {preload_replace:my_channel="presentations"}
    {preload_replace:my_template_group="site"}
    {embed="_embeds/.head" sitearea="site_presentations}
    {embed="_embeds/.header"}
    
    <!-- Middle Section Start here -->
    
    <div id="middle">
     
     <!-- Middle Left Section Start here -->
      
    <div class="sec_innerMain">
        <h1>{exp:channel:info channel="{my_channel}"}{channel_title}{/exp:channel:info}</h1>
        <div class="divFull quicklink"><a href="http://{site_url}">HOME</a> > <a href="http://{path=/news-center}">News Centre</a> > <a href="http://{site_url}index.php/{my_channel}/">{exp:channel:info channel="{my_channel}"}{channel_title}{/exp:channel:info}</a> {if segment_2 !=""} >{exp:channel:entries channel="{my_channel}" url_title="{segment_2}"}{title}{/exp:channel:entries} {/if} </div>
        <div class="gray_sap"> </div>
        <div class="page_content"> {exp:channel:entries channel="{my_channel}" status="open|featured"}
          <div class="event_listing">
            <div class="event-thumb img-border">{if thumb_image !=""}{exp:imgsizer:size image="{thumb_image}" width="104" alt="{title}"}{if:else}{no_image}{/if}</div>
            <div class="event-listing-txt">
              <h2>{title}</h2>
    <p>          {short_desc}<br />
              <div align="right"><strong><a href="http://{exp:linklocker">Download</a> </strong></div><br />
            </div><br />
          </div><br />
          {if no_results}<br />
          <br />
          Sorry!, no Presentation here!<br />
    {/if}<br />
          {/exp:channel:entries} </div><br />
      </div></p>
    
    <p> <!-- Middle left Section ends here --></p>
    
    <p>  <!-- Middle Right Section Start here --><br />
     <br />
     {embed="_embeds/.banner_right"} </div></p>
    
    <p><!-- Footer Section Start here --><br />
    {embed="_embeds/.footer"}

  • #4 / Aug 12, 2011 8:13pm

    Marcus Neto

    1005 posts

    Creative Cycle,

    The important thing is to add the paginate parameter to the exp:channel:entries tag pair where ever you want to have pagination.

    I am taking a stab at what you are trying to do in the code below:

    <div class="page_content"> 
            {exp:channel:entries channel="{my_channel}" status="open|featured" paginate="bottom"}
                  <div class="event_listing">
                    <div class="event-thumb img-border">
                        {if thumb_image !=""}
                            {exp:imgsizer:size image="{thumb_image}" width="104" alt="{title}"}
                        {if:else}
                            {no_image}
                        {/if}
                    </div>
                    <div class="event-listing-txt">
                          <h2>{title}</h2>
    <p>                      {short_desc}<br />
                          <div align="right"><br />
                            <strong><br />
                                <a href="http://{exp:linklocker">Download</a><br />
                            </strong><br />
                        </div><br />
                    </div><br />
                  </div><br />
                  {if no_results}<br />
                    Sorry!, no Presentation here!<br />
                {/if}<br />
              {/exp:channel:entries}<br />
        </div>

    Does that make it clearer?

    Also you can read up on all of the exp://channel parameters which may help.

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

ExpressionEngine News!

#eecms, #events, #releases