2011-08-10 81 views
0

我嘗試了一切,我知道如何在Drupal上確認我的搜索結果頁面,以顯示底部的尋呼機。我在一個圖書館工作,知道有幾個網頁提到圖書館,但只有十個會顯示在預期的第一頁上,但在第一頁之後沒有任何選項可供查看。我在Drupal上搜索並查看代碼,它看起來是一樣的,但是,我無法使尋呼機功能正常工作。Drupal 7 - 搜索結果傳呼機

有什麼建議嗎?

回答

0

,如果你正試圖使查詢resut尋呼機嘗試做如下所示

$query = db_select('node', 'n')->extend('PagerDefault'); 
->condition('type', 'blog') // you query condition 
->fields('n', array('title')) // the fields that you request from database 
->limit(10); // the number of result/row per page 
$queryresult = $query->execute() ; 

$content = ''; 
foreach ($queryresult as $row) { 
    $content .= $row->title."<br/>"; // the row view content 
} 
$content .= theme('pager'); // this will display the pagination content 
echo $content;