Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6776911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:05:07+00:00 2026-05-26T16:05:07+00:00

i’m working on a symfony project and needed to create a paging system for

  • 0

i’m working on a symfony project and needed to create a paging system for long lists. I used sfPropelPager plugin to generate them. I’m using it this way:

I print all the pages in diferent <div> tags and only set visible the first. Then whith a javascript function, i show the other pages when clicking on next, prev, … buttons.

the function i use to generate the pages is this:
`

    $pager = new sfPropelPager('SysLogTbl',sfConfig::get('sfPropelPagerLines'));
    $c = new Criteria();
    $c->add('codigo_maestro',$this->getCodigoMaestro());
    $c->add('codigo_registro',$id);
    $c->addDescendingOrderByColumn('fecha_log');
    $pager->setCriteria($c);
    $pager->init();
    return $pager;`

and the view code is:

        foreach($pager->getLinks() as $page){

        echo'<div id="logpage'.$page.'" class="logpages" style="width:100%;';
        if($page!=1){echo ' display:none';}
        echo '">';

        $pager->setPage($page);
        $pager->init();
        $results= $pager->getResults();

        echo '<table class="none_list" id="list">';
        echo "<thead>";
        echo "<td width='8%'>Usuario</td><td width='8%'>Acci&oacute;n</td>";
        echo "<td width='13%'>Campo</td><td width='25%'>Valor Antiguo</td>";
        echo"<td width='25%'>Nuevo valor</td><td width='21%'>TimeStamp</td>";
        echo "</thead>";
        foreach($results as $log){
            echo '<tr id="'.$log->getCodigoLog().'" >';

            < here goes each entry in the page display, not relevant >


        }
        echo '</table>';

        echo "<div style='float:left'>";
        echo image_tag('first.png',array('class'=>"first"));
        echo image_tag('previous.png',array('class'=>"previous"));
        echo "</div>";
        foreach($lista->getLinks() as $page){
            echo "<div class='logindex' id='".$page."' style='float:left; cursor:pointer'>";
            if($page == $lista->getPage()){
                echo "<b>".$page."</b>";
            }else{
                echo $page;
            }
            echo "</div>";
        }
        echo image_tag('next.png',array('class'=>"next"));
        echo image_tag('last.png',array('class'=>"last"));
    echo '</div>';
    $lista->setCursor($lista->getNextPage());

}
$lista->setCursor($lista->getFirstPage());?>

The problem is sfPropelPager only generates at most 5 pages.

Do you know where must i configure this to show all the pages?? thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:05:07+00:00Added an answer on May 26, 2026 at 4:05 pm

    If you check the source of sfPager you’ll see it has a $nb_links parameter that tells how many links you want. The default is 5.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.