Ok. Here's my graphics_controller.php section for the category action:
function category($cat = null) {
$this->Graphic->recursive = 1;
$this->GraphicCategory->recursive = 0;
if($cat)
{
// Gets the GraphicCategory ID based on the name passed
through the
URL
$this->Graphic->catId = $this->GraphicCategory-
>findAll(array('name' => $cat));
// Sets it in a nice little variable, $catId
$this->Graphic->catId =
$this->Graphic->catId[0]['GraphicCategory']
['id'];
// Paginate starts here
$data = $this->paginate(array('graphic_categories_id'
=> $this-
>Graphic->catId));
$this->set('graphics', $data);
}
else
{
// If $cat is not passed thru the URL,
redirect to graphics index.
$this->redirect('/graphics/');
}
}
and here's the code I'm using in my view to generate the links:
<div class="paging"><?=$paginator->prev('<< Previous', null, null,
array('class' => 'disabled')); ?> |
Page <?=$paginator->counter(); ?> |
<?=$paginator->next('Next >>', null, null, array('class' =>
'disabled')); ?></div>
Thanks
On Jan 30, 4:37 pm, "nate" <[EMAIL PROTECTED]> wrote:
> Can you paste the code you're using to generate the link? If you just
> pass it in the URL parameters, it should get picked up. However, if
> you need it to appear in a certain place in the URL, you have to set
> up a route for it.
>
> Seehttp://cake.insertdesignhere.com/posts/view/10
>
> On Jan 30, 4:58 pm, "Jonathon Davis" <[EMAIL PROTECTED]> wrote:
>
> > Does anyone know how to make sure it gets the parameter? I'm at the
> > end of my rope now and the deadline for this project is quickly
> > approaching.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---