[support] theme pager wrong url

Eric Mckenna eric.mckenna at gmail.com
Mon Feb 18 17:02:13 UTC 2008


I would check the view, and the raw results of the page_query function.
 
I also think that the "node" portion of "node?page=2"  is the node view 
that shows all nodes, not the individual items like node/1.

Davide Michel 'ZioBudda' Morelli wrote:
> Hi all, I have created this small page:
>
> <?
> include_once '/opt/www/newzb/includes/bootstrap.inc';
> drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
>
> $view = views_get_view('feeds_clone');
> $datiView = views_build_view('queries', $view);
> $res = pager_query($datiView['query'],20);
> $output = '';
> while ($data = db_fetch_object($res)) {
>     $node = node_load($data->nid);
>     //print_r($node);
>     $output .= '
>     <div class="feedEsterniLista">
>         <h1><a href="'.url("node/".$node->nid).'">'.$node->title.'</a></h1>
>         <div class="linksottoLista">
>         (Inserito il '.date("d/m/Y", $node->created).' alle 
> '.date("H:i", $node->created).' via '.$node->chi.')
>         </div>
>         <div class="hrLista"><hr /></div>
>     </div>
>     ';
> }
> $output .= theme('pager', NULL, 20, 0);
> echo theme("page", $output);
>
> ?>
>
> My problem is that "theme('pager')" write the wrong url: file's url is 
> "www.mydomain.net/file.php" so I expect that theme("page") create link's 
> url like "file.php?page=2" (etc etc), but the function create link like 
> "node?page=2" where /node/ is my "default page", Where is my error ? I 
> use Drupal 5.6.
>
> M.
>
>   



More information about the support mailing list