thank you Ivan,... I have tried that by the book,... and probably missed
something on its way in a first place,...
well,... this is what I got now, and it's working,
function category($id = null)
{
if($this->is_user())
{
$this->set('user_obj', $user =
$this->User->findBy
i think this is your answer:
function category($id = null){
if($this->is_user()) {
$this->set('user_obj', $user =
$this->User->findById($this->user['id']));
}
$category = $id;
$cat_id = array_search($category,
Configure::read('Blog.blog_category'));
$this->paginate = ar
hi guys,... I have a problem with pagination in a controller,... can
someone help me please,...
I'm getting an error: SQL Error: 1054: Unknown column 'limit' in 'where
clause'
how can I do this,...?
function category($id = null)
{
if($this->is_user())
{
$this->set('user_obj
Thanks for the reply cricket, I'll try sortable and see if anything pops.
On Thursday, November 15, 2012 5:28:15 AM UTC+11, cricket wrote:
>
> If a view is out then I think you're best bet is to keep the DB
> records in the order you need and leave pagination to just limiting
> the number. Have
If a view is out then I think you're best bet is to keep the DB
records in the order you need and leave pagination to just limiting
the number. Have a look at the SortableBehavior. Perhaps you could
hack up a routine that ensures the records remain sorted properly even
as new ones are added.
On We
Hi all,
I've got a problem which I hope is interesting to everyone.
Got a generic table, in which each item has an image and an attribute that
says wether the orientation is portriat or landscape.
id int(10) unsigned NOT NULL
namevarchar(255) NULL
image varchar(255) NULL
image_portrait tinyint(
Router::connect(
'/:slug',
array(
'controller' => 'categories',
'action' => 'view'
),
array(
'slug' => '[-a-z0-9]+',
'pass' => array('slug')
)
);
Router::connect(
'/:slug/:page',
Hello,
I have created a route which looks like this Router::connect('/:slug',
array('controller' => 'categories', 'action' => 'view'), array('pass' =>
array('slug')));
Until here, everything works okey, visiting the
link http://example.com/animals-and-pets, works perfect.
On this page I have
Thank you Lorenzo.
Att.,
--
***Thiago Belem*
Desenvolvedor
Rio de Janeiro - RJ - Brasil
+55 (21) 8865.9250
thiagobelem.net
cont...@thiagobelem.net
*Skype / gTalk **»* thiago.belem.web
*LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt*
Assando Sites*, curso de CakePHP *»* assando-sites.com.br
20
Check this out, this will solve your problem:
https://github.com/cakephp/CakeFest-2010-Workshop/blob/master/models/event.php#L88
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
I created my custom find-type with this code:
https://gist.github.com/1617962
Now when i run something like *$this->paginate('Model');* on my controller
i get a few warnings (the queries are executed):
*Notice* (8): Undefined index: count
[*/var/www/cakephp/2.0/lib/Cake/Model/Model.php*, line *25
If this is a simple pagination problem then I am confused what it has
to do with the JsHelper?
As the error is from a helper is has to be realted to something in
your view/layout (unless your calling views in your controller).
Have you checked the error stack to see what line in your code is
I'm trying to do simple pagination with cake and getting the following
error: "Warning (4096): Object of class JsHelper could not be
converted to string [CORE/cake/libs/view/helpers/html.php, line 444]"
Here is my code:
//controllers/orders_controller.php
class OrdersController extends AppContro
Thanks for answering Johan :)
I tracked the problem down to passing form data via "GET" through an
iframe. I located where the problem was occurring, but I couldn't
figure out why. I tried a few different approaches to no avail. In any
case I resorted to using "POST" and Cache and the app once aga
Could it be that this second page is coming through an ajax request?
This type of error usually pops up when you try to use the PaginationHelper
but no pagination has been done on the controller.
Cheers,
- Johan
On Wed, Jun 29, 2011 at 9:12 PM, Ed Propsner wrote:
> I've been poking around with
I've been poking around with this for a bit and have yet to find out what's
going wrong. I'm passing a paginated result set to a view and everything
renders fine until I try to access the next page of results.
Example:
// CONTROLLER //
$this->paginate = array(
'contain' => array(
'OnlineUser'
Hey,
Try the containable behaviour. It is designed specifically to filter
out related results ("Feeds" in your case).
On Feb 7, 3:48 am, Joseph Buarao wrote:
> Hello Guys,
>
> Thanks for your help Guys, I have fixed the limit statement but still
> in problem, I think I found the problem not in m
Hello Guys,
Thanks for your help Guys, I have fixed the limit statement but still
in problem, I think I found the problem not in my query it is in my
data structure, I was trying to paginate the data in one category,
here's my data structure
Array
(
[0] => Array
(
[Category
It's 'limit' not 'limits'. Not sure if that's the only problem, but it's a
starter.
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 5 Feb 2011, at 07:48, Joseph Buarao wrote:
> Hi Fellow Programmer,
>
> I getting problem with my code, I don't know what's th
Limit needs to be singular
"limit"
:-)
On Feb 4, 11:48 pm, Joseph Buarao wrote:
> Hi Fellow Programmer,
>
> I getting problem with my code, I don't know what's the reason why the
> sql limit statement is not working on my paginate query. below are my
> codes feel free to suggest, I really Appre
Hi Fellow Programmer,
I getting problem with my code, I don't know what's the reason why the
sql limit statement is not working on my paginate query. below are my
codes feel free to suggest, I really Appreciated it.. Thank you in
advance for your support GUYS...
$this->paginate = array('condition
Thank you very much
On Thu, Aug 12, 2010 at 11:32 AM, Andras Kende wrote:
> Try something like:
>
> $this->paginate = array(
> 'conditions' => array(Project.id => $ProjectIdArray),
> 'limit' => 20
> );
>
> $projects = $this->paginate('Project');
>
> // debugging in controller ;-)
> // pr
Try something like:
$this->paginate = array(
'conditions' => array(Project.id => $ProjectIdArray),
'limit' => 20
);
$projects = $this->paginate('Project');
// debugging in controller ;-)
// print_r($projects);
$this->set(compact('projects'));
then add the paginator links in the
Dear All,
I need pagination below query :
$projectTable = $this->Project->findAllById($ProjectIdArray);
Please give me suggestion..
--
Regards,
Mohammad Arif Hossen
Software Enginner at
Epsilon Consulting and Development Services(ECDS)
www.ecds-tech.com
www.arifhossen.wordpress.com
Cell: +
Hello,
Is there any way to get PaginationHelper work when developing Facebook
apps?
I am sorry to as it so general, but I believe that everyone who
developed for FB (FBML) encountered the same problem as me.
P.S. I implemented the Facebook API to CakePHP following this article
http://facebook-de
Hello,
I would like to ask how is it possible to use CakePHP with pagination
when developing a Facebook application.
I implemented Facebook API to CakePHP following this article
http://facebook-developer.net/2007/10/18/building-your-first-facebook-application-with-cakephp/.
Everything works almos
Hi guys,
I am facing a huge problem in my app.I am trying to use pagination and
in actions that have arguments pagination doesn't work because the id
is not passed.The url looks like :
http://localhost/voyage~voyage-source/index.php/parameters/view/1
and when i click on 2nd page to see results the
Hi bino,
In your views , add this line
$paginator->options(array('url' => $this->passedArgs));
Thanks
Isaac
On Sat, Jul 18, 2009 at 11:06 PM, bino dev wrote:
> Hi Friends,
>
> Iam very new in cake php.
> I need a help on the pagination . Actually iam trying to make a search with
> the compan
Hi Friends,
Iam very new in cake php.
I need a help on the pagination . Actually iam trying to make a search with
the company and phone number. Iam pasting the code below. When i search with
a company with 'A' iam getting the result which have the compnay name which
starts with A. When i go to the
On Apr 10, 2:03 pm, kaushik wrote:
> I have a search form for Blog with pagination. The form is like below.
>
> id="BlogSearchForm" method="post" action="/blogs/search">
>
>
>
> id="keywords" />
> id="category" />
> value="Search" />
>
>
> I want to set so that the url after hitting sea
I have a search form for Blog with pagination. The form is like below.
I want to set so that the url after hitting search button, it should
come with all the params. I mean it should: "http://
videon.smallbizmavericks.com/blogs/search/keywords:test1/
category:test2", so that in paginatio
Hey.
First, please excuse my terrible English. Today I need a pagination
solution, but I can't get it alone. So please look up on my code:
In the Controller:
function index($page=null){
$videos = $this->Video->find('all');
$this->set('videos',$videos);
$this->set('videos'
You have to add the query to the pagination helper by calling
$paginator->options(...)
In your controller you're using a POST to get the search query. I
recommend changing this to a GET so that it can be passed to other
pages as part of the URI
I do paginated search using a get like this /contro
This has been covered numerous times before.
http://groups.google.com/group/cake-php/search?q=search+pagination&;
If you have a specific issue related to this then please ask again.
/Martin
On Nov 3, 4:58 am, 0x1A4 <[EMAIL PROTECTED]> wrote:
> Hi all im relatively new to Cakephp.Currently im c
Hi all im relatively new to Cakephp.Currently im creating a web app
for our in house usage to track and monitor tenders.My problem right
now is im creating a search function.Whenever user submit strings to
the search query it all went well.However the problem occur on
pagination when the search re
Sorry google sent me to a single msg page instead of the thread page,
didn't see the rest.
-Ben
On Feb 21, 10:21 am, Mr-Yellow <[EMAIL PROTECTED]> wrote:
> http://www.domain.com/controller/action/test/test:1/page:2
> results
> in:http://www.domain.com/controller/action/page:1http://www.domain.
http://www.domain.com/controller/action/test/test:1/page:2
results in:
http://www.domain.com/controller/action/page:1
http://www.domain.com/controller/action/page:3
-Ben
On Feb 20, 10:26 am, "Mouse[ON]" <[EMAIL PROTECTED]> wrote:
> hi guys,
>
> maybe someone could help me, today i hit a wall
http://api.cakephp.org/1.2/paginator_8php-source.html#00287
It seems to me that it's missing the code to pass in any existing
params or the full URL of the current page.
Ticket time?
-Ben
On Feb 20, 10:26 am, "Mouse[ON]" <[EMAIL PROTECTED]> wrote:
> hi guys,
>
> maybe someone could help me,
Hi,
I use pagination for my view. In this in the index page I m showing
all records from the database and for one page I m showing 15 records
only. In my controller command for the pagination is
" $this->set('customers', $this->paginate('Customer')); "
But if my record is only three then also p
Resolved:
In the new controller, I added these line to the index function:
function admin_index() {
$this->paginate = array('limit' => 20);
if(!isset($this->params['pass']['sort'])) $this->paginate['options']
['sort'] = 'created';
else $this->paginate['options']['sort'] =
I have a URL calling a controller, and that controller is calling
ANOTHER controller by requestAction.
This is the URL I have:
http://localhost/admin/sections/view/175/page:1/sort:file/direction:asc
I send the parameters to the new controller, and everything but the
direction works fine.
When I
helps a lot, actually!
Bernard
> Thanks for your help! With your assistance I solved the problem.
>
> For those of you that might encounter the same Cake Pagination Problem,
> this is how I fixed it:
>
> My Controller:
> ---
> /**
>* Index Action.
Hi Steve,
That is a logic problem which simply goes away if you use PRG (Post
Redirect Get). See http://www.noswad.me.uk/Pagination/PRG/ for an
example and code you can download.
If you don't want to use PRG you will need for the links to 'pull' the
form data with each link - that requires ajax
I am new to cake and I have a question regarding the pagination found
here http://wiki.cakephp.org/tutorials:pagination .
I have read and read, and unfortunately, I can not solve my "Search
value disappearing in the pagination element" problem. I simply create
a form, submit it, and the page disp
44 matches
Mail list logo