You need to add ); to the end of the line where you call
$this->paginate()
In php lines end in semi-colons
You'll find it helpful if you can setup an editor that matches braces and
brackets, code hinting & code completion
Many editors have such features - Google to get the info.
- S
On 28 Dec 20
Yes, figured out
On 28 déc, 12:55, Tilen Majerle wrote:
> public function index() {
> var $paginate = array(
> 'limit' => 5,
> 'order' => array(
> 'id' => 'asc'
> )
> );
> $this->set('items', $this->paginate('Item')
> }
>
>
public function index() {
var $paginate = array(
'limit' => 5,
'order' => array(
'id' => 'asc'
)
);
$this->set('items', $this->paginate('Item')
}
how can this works ?? :D "var" inside method ? :)
--
Lep pozdrav, Tilen Majerle
Found it. Seems my paginators were deprecated.
I used this :
Paginator->numbers(); ?>
Moreover, the VAR had to be declared before the functions.
On 28 déc, 12:29, "J." wrote:
> Here is my controller :
>
> class ItemsController extends AppController {
> public $name = 'Items';
> public
Here is my controller :
5,
'order' => array(
'id' => 'asc'
)
);
$this->set('items', $this->paginate('Item')
}
and I have this in my view :
prev(); ?>
numbers(); ?>
next(); ?>
And I get this error message :
Parse error: syntax erro
or for 2.0 this:
http://book.cakephp.org/2.0/en/core-libraries/components/pagination.html
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2011/12/26 euromark
> you are probably looking for
> http://book.cakephp.org/view/1231/Pagination
>
>
> On 26 Dez., 17:40, "J." wrote:
> > People here are
you are probably looking for
http://book.cakephp.org/view/1231/Pagination
On 26 Dez., 17:40, "J." wrote:
> People here are of great help, so I figured out I may ask here.
>
> I have an Item controller (An Item is a post on my website) with this
> function :
>
> public function index() {
>
http://book.cakephp.org/2.0/en/controllers.html#Controller::paginate
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2011/12/26 J.
> People here are of great help, so I figured out I may ask here.
>
> I have an Item controller (An Item is a post on my website) with this
> function :
>
>pub
People here are of great help, so I figured out I may ask here.
I have an Item controller (An Item is a post on my website) with this
function :
public function index() {
$this->set('items', $this->Item->find('all', array('limit' =>
5 )));
}
When in view, I echo it out this like
essage-
> From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
>
> Of heohni
> Sent: Thursday, April 07, 2011 12:15 PM
> To: CakePHP
> Subject: Re: Paginate an array?
>
> Hi,
>
> I need to push this up, I still get in trouble with it.
>
>
: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of heohni
Sent: Thursday, April 07, 2011 12:15 PM
To: CakePHP
Subject: Re: Paginate an array?
Hi,
I need to push this up, I still get in trouble with it.
I select all my members with a find call:
$getMembers = $this->Memb
K
-Original Message-
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of heohni
Sent: Thursday, April 07, 2011 12:15 PM
To: CakePHP
Subject: Re: Paginate an array?
Hi,
I need to push this up, I still get in trouble with it.
I select all my members with a
sage-
> From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
>
> Ofheohni
> Sent: Friday, April 01, 2011 10:50 AM
> To: CakePHP
> Subject: Paginate an array?
>
> Hi,
>
> I have a find() function to get some data.
> The user has the chance to
ailto:cake-php@googlegroups.com] On Behalf
Of heohni
Sent: Friday, April 01, 2011 10:50 AM
To: CakePHP
Subject: Paginate an array?
Hi,
I have a find() function to get some data.
The user has the chance to modfiy the data and all changes I keep in
an array.
Can I also give that array to the pagin
Hi,
I have a find() function to get some data.
The user has the chance to modfiy the data and all changes I keep in
an array.
Can I also give that array to the paginate function? As I want to
paginate through the users custom made data and not the original DB
result? Any ideas on that?
Thanks and
Yes I looked at the custom query pagination; but the reason that is no
good is in the title 'query'. I'm not doing a query on a database I've
already got my data set that I want to paginate.
Well I guess the custom query pagination is the way to go in that I'll
have to override the existing pagin
You can try custom query pagination.
http://book.cakephp.org/view/249/Custom-Query-Pagination
On Sep 6, 11:53 pm, DavidH wrote:
> Hi
>
> I'm using CakePHP as a development framework; but my data is stored /
> retrieved in documents from a Couch DB. I've written home grown
> classes to access th
Hi
I'm using CakePHP as a development framework; but my data is stored /
retrieved in documents from a Couch DB. I've written home grown
classes to access the Couch and have turned off Cake's desire for a
DBMS by creating my own dbo_source that just returns true making Cake
think it's connected O
Hi Chris,
Here's a simple solution I use for myself (I don't use XML, but I use
it for a search function)
$xmlData = [read the xmlfeed and return it as an array]
/* run through the array */
foreach($xmlData as $key => $val) {
/* the value will be sortable by the key */
$this->pagination[$
On Jan 18, 2008 1:54 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Why are you using MVC if you aren't making models?
It's not about not using models, it's about using non-database powered models.
--
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handl
@rtconner: Thanks, I'll take a look at this.
@Michael: The project is much bigger, that's just one tricky part of
it.
On 18 Jan., 19:54, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> On Jan 18, 12:38 pm, Arne-Kolja Bachstein <[EMAIL PROTECTED]> wrote:
>
> > Hi there,
>
> > does anyone know if
On Jan 18, 12:38 pm, Arne-Kolja Bachstein <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> does anyone know if there is a chance to paginate data thats not
> fetched from the database/a model using the paginator component or
> something?
>
> The situation: I have a search form that fetches its hits fr
I guess you could overwrite the paginate() and paginateCount() methods
in the model.
On Jan 18, 10:38 am, Arne-Kolja Bachstein <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> does anyone know if there is a chance to paginate data thats not
> fetched from the database/a model using the paginator compon
Hi there,
does anyone know if there is a chance to paginate data thats not
fetched from the database/a model using the paginator component or
something?
The situation: I have a search form that fetches its hits from an XML
file. That's done by first fetching the XML file, saving it to the tmp
fo
24 matches
Mail list logo