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 4623152
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:56:43+00:00 2026-05-22T02:56:43+00:00

1)how do i access the search $keyword inside the paginator partial to create search

  • 0
  • 1)how do i access the search $keyword inside the paginator partial to create search freindly urls ? clearly, passing the keyword as $this->view->paginator->keyword doesnt work.

  • 2) currently, the search button’s name is also send as param . for eg when searching for ‘a’ the url becomes http://localhost/search/index/search/a/submit//page/2. any way to stop this ?

Search Form:


<form id="search" method="get" action="/search">
                        <input id="searchfield" onClick="this.value=''" type="text" name="search" value="Search wallpapers"/>
                        <input id="searchbutton" type="submit" value="" name="submit"/>
                    </form>

Action inside searchController:


public function indexAction()
    {        
        $keyword=$this->_request->getParam('search');        
        $alnumFilter=new Zend_Filter_Alnum();
        $dataModel=new Model_data();         

        $adapter=$dataModel->fetchPaginatorAdapter("title LIKE '%".$keyword."%'", '');
        $paginator=new Zend_Paginator($adapter);
        $paginator->setItemCountPerPage(18);
        $page=$this->_request->getParam('page', 1);
        $paginator->setCurrentPageNumber($page);

        $this->view->paginator=$paginator;
        $this->view->keyword=$keyword;

    }

index.phtml (view) file:


partialLoop(‘wallpaper/table-row.phtml’,$this->paginator) ;?>

    <div id="page-links">

        <?= $this->paginationControl($this->paginator,'Sliding','partials/search-pagination-control.phtml');?>       

    </div>  

search-paginator-control.phtml file:


if ($this->pageCount){
    $params=Zend_Controller_Front::getInstance()->getRequest()->getParams();


    if(isset($this->previous)){
    ?>
        <a href="<?php echo $this->url(array_merge($params,array('page'=>$this->previous)));?>">Previous</a>
    <?php
    }
    else{
        ?> Previous <?php
    }

    foreach($this->pagesInRange as $page){
        if($page !=$this->current){
            ?>
        <a href="<?echo $this->url(array_merge($params,array('page'=>$page)));?>"><?=$page;?></a>
        <?
        }
        else{
            echo $page;
        }
    }

    if(isset($this->next)){
    ?>
        <a href="<?php echo $this->url(array_merge($params,array('page'=>$this->next)));?>">Next</a>
    <?php
    }
    else{
        ?> Next <?php
    }
}
  • 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-22T02:56:44+00:00Added an answer on May 22, 2026 at 2:56 am

    The paginationControl view helper accepts a 4th parameter, that is a array of parameters, so in your case you could do something like this:

    <div id="page-links">
    
        <?= $this->paginationControl($this->paginator,'Sliding','partials/search-pagination-control.phtml', array('keyword' => $this->keyword));?>       
    
    </div>
    

    Then you access it inside your pagination using $this->keyword.

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

Sidebar

Related Questions

Does Microsoft Access have Full Text Search? I know that MySQL and SQL Server
if I use Firefox and access http://svcs.ebay.com/services/search/FindingService/v1 I get some sort of XML in
For example, to access a page in my search folder, I have to write:
I'm looking for a way to access the address bar search so that i
I need to write a query that will perform a keyword search on a
I'm using jquery to access a asp.net web service from my website. This web
Here is my code: Dim connectionString As String =Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\ACCESS DATABASE\search.mdb Dim selectCommand As
I styled a search bar on this site here It disappears completely in IE7
How can i get access token for searching venues in foursquare. From this gem,
Okay this is part of my search results project, in it, I have description

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.