Hi People,

After Following the article on: http://cake.insertdesignhere.com/posts/view/16
I tried to use the paging i also switched off the AJAX part in the
tutorial. Im not sing ModRewrite which i think is the reason its
breaking:

when i use paging the code that generates the next previous buttons
fail to include the controller / action in the generated URL when not
using modrewrite:

<? $paginator->options(array()); ?>

<?=$paginator->prev('<< Previous', null, null, array('class' =>
'disabled')); ?> |
<?=$paginator->next('Next >>', null, null, array('class' =>
'disabled')); ?> |
Sort by
<?=$paginator->sort('created'); ?> |
<?=$paginator->sort('updated'); ?> |
Page <?=$paginator->counter(); ?>

<? pr($data); ?>

this code generates this:

<div 0="" class="disabled"><< Previous</div> |
<a href="/linked2/index.php/page:2" >Next >></a> |
Sort by
<a href="/linked2/index.php/sort:created/page:1/order:/direction:asc"
>Created</a> |
<a href="/linked2/index.php/sort:updated/page:1/order:/direction:asc"
>Updated</a> |
Page 1 of 4


So i though well i will just include the URL in the options like so:

<? $paginator->options(array()); ?>

<?=$paginator->prev('<< Previous', array('url' => 'links/
displaylinks/'), null, array('class' => 'disabled')); ?> |
<?=$paginator->next('Next >>', array('url' => 'links/displaylinks/'),
null, array('class' => 'disabled')); ?> |
Sort by
<?=$paginator->sort('created', null, array('url' => 'links/
displaylinks/')); ?> |
<?=$paginator->sort('updated', null, array('url' => 'links/
displaylinks/')); ?> |
Page <?=$paginator->counter(); ?>

this ends up generating this:

<div class="disabled"><< Previous</div> |
<br />
<b>Notice</b>:  Undefined offset:  0 in <b>/var/www/linked2/cake/libs/
router.php</b> on line <b>632</b><br />
<br />
<b>Notice</b>:  Undefined offset:  0 in <b>/var/www/linked2/cake/libs/
router.php</b> on line <b>632</b><br />
<br />
<b>Notice</b>:  Undefined index:   in <b>/var/www/linked2/cake/libs/
router.php</b> on line <b>632</b><br />
<a href="/linked2/index.php/links/displaylinks/:" >Next >></a> |
Sort by
<br />
<b>Notice</b>:  Undefined offset:  0 in <b>/var/www/linked2/cake/libs/
router.php</b> on line <b>632</b><br />
<br />
<b>Notice</b>:  Undefined offset:  0 in <b>/var/www/linked2/cake/libs/
router.php</b> on line <b>632</b><br />
<br />
<b>Notice</b>:  Undefined index:   in <b>/var/www/linked2/cake/libs/
router.php</b> on line <b>632</b><br />
<a href="/linked2/index.php/links/displaylinks/:/sort:created/page:1/
order:" >Created</a> |
<br />
<b>Notice</b>:  Undefined offset:  0 in <b>/var/www/linked2/cake/libs/
router.php</b> on line <b>632</b><br />
<br />
<b>Notice</b>:  Undefined offset:  0 in <b>/var/www/linked2/cake/libs/
router.php</b> on line <b>632</b><br />
<br />
<b>Notice</b>:  Undefined index:   in <b>/var/www/linked2/cake/libs/
router.php</b> on line <b>632</b><br />
<a href="/linked2/index.php/links/displaylinks/:/sort:updated/page:1/
order:" >Updated</a> |
Page 1 of 4

Im using the lastest nightly SVN build (1.2.x.x_19.02.2007)

Any ideas how to fix this?

Thanks!
Maxus


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to