mthabisi mlunjwa | 1 Sep 2011 11:06
Picon

cakephp Paginator->sort()

In my view I have the following:

<th><?php echo $this->Paginator->sort('country_id', 'Country.name');?
></th>

The above code will display country_id as the heading of a list of
counties. I'm looking for a way to rename country_id such that it
displays as Country.

Please note country_id is a foreign key for table Country

--

-- 
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 with their CakePHP
related questions.

To unsubscribe from this group, send email to
cake-php+unsubscribe@... For more options, visit this group
at http://groups.google.com/group/cake-php

Jeremy Rottman | 1 Sep 2011 11:13
Picon

Code reivew of EAV Behavior

I have spent a bit of time working on an EAV implementation in cake.
It isn't quite finished yet, but I would like to see what everyone
thinks of where I am going. And possibly see if there are any
improvements that I could or should make.

This is my first behavior so please feel free to be brutal.

I have put it on github for everyone. It can be found here:
https://github.com/rottmanj/cakephp-eav_attribute

--

-- 
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 with their CakePHP
related questions.

To unsubscribe from this group, send email to
cake-php+unsubscribe@... For more options, visit this group
at http://groups.google.com/group/cake-php

O.J. Tibi | 1 Sep 2011 11:43
Picon
Gravatar

Re: Code reivew of EAV Behavior

Wow, this looks promising, Jeremy. It does look simple, but I think this will see a lot of action in web shops and product catalogs where the products have a certain number of variants. I'm going to try this in my spare time.

Cheers,
OJ

--
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 with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php
taqman filler | 1 Sep 2011 12:59
Picon

how to attach image in ajax link

 <?=$ajax->link(($html->image("like",array('escape'=>false))),'/user_articles/vote/up/'.$article['Article']['id'],array('update'=>'vote_'.$article['Article']['id']),null,false);?>
out put
<img src="/cakeplate/img/like" alt="" />
before ask
I try to find answer in group and follow it but doesn't work
how to fix it

--

-- 
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 with their CakePHP
related questions.

To unsubscribe from this group, send email to
cake-php+unsubscribe@... For more options, visit this group
at http://groups.google.com/group/cake-php

scs | 1 Sep 2011 14:59
Picon

Re: cakephp Paginator->sort()

Change:
     <th><?php echo $this->Paginator->sort('country_id',
'Country.name');?></th>
To:
     <th><?php echo $this->Paginator->sort('Country', 'Country.name');?
></th>

http://book.cakephp.org/view/1233/Pagination-in-Views

On Sep 1, 5:06 am, mthabisi mlunjwa <mmlun...@...> wrote:
> In my view I have the following:
>
> <th><?php echo $this->Paginator->sort('country_id', 'Country.name');?
>
> ></th>
>
> The above code will display country_id as the heading of a list of
> counties. I'm looking for a way to rename country_id such that it
> displays as Country.
>
> Please note country_id is a foreign key for table Country

--

-- 
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 with their CakePHP
related questions.

To unsubscribe from this group, send email to
cake-php+unsubscribe@... For more options, visit this group
at http://groups.google.com/group/cake-php

Teddy Zeenny | 1 Sep 2011 16:27
Picon

View caching with gzip

Hey guys,

Does anyone have an idea on how to gzip cached views ?

The way I would do it is use ob_start ('ob_gzhandler') in my
controller's beforeFilter.

The problem is when a view is cached, the beforeFilter is no longer
called.

--

-- 
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 with their CakePHP
related questions.

To unsubscribe from this group, send email to
cake-php+unsubscribe@... For more options, visit this group
at http://groups.google.com/group/cake-php

Ma'moon | 1 Sep 2011 16:53
Picon

Re: View caching with gzip

put ob_start ('ob_gzhandler') in your bootstrap.php file.

On Thu, Sep 1, 2011 at 10:27 AM, Teddy Zeenny <teddyzeenny-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hey guys,

Does anyone have an idea on how to gzip cached views ?

The way I would do it is use ob_start ('ob_gzhandler') in my
controller's beforeFilter.

The problem is when a view is cached, the beforeFilter is no longer
called.

--
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 with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php

--
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 with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php
Teddy Zeenny | 1 Sep 2011 17:00
Picon

Re: View caching with gzip

Whether I use gzipping depends on the action/view, and not in my entire application as sometimes my actions serve pdf or image content instead of html.  So I gzip based on the action i.e:

if( $this->params['action']=='view' )ob_start('ob_gzhandler'); 

You think I can condition my gzip in boostrap.php ? 

On Thu, Sep 1, 2011 at 5:53 PM, Ma'moon <phpirate-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
put ob_start ('ob_gzhandler') in your bootstrap.php file.


On Thu, Sep 1, 2011 at 10:27 AM, Teddy Zeenny <teddyzeenny-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hey guys,

Does anyone have an idea on how to gzip cached views ?

The way I would do it is use ob_start ('ob_gzhandler') in my
controller's beforeFilter.

The problem is when a view is cached, the beforeFilter is no longer
called.

--
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 with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php

--
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 with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php

--
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 with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php
avairet | 1 Sep 2011 17:09

Delete translated contents for a Tree Model

I'm using TranslateBehavior on a model that is a Tree Model.

When I delete a child node from the Tree, related contents in my i18n
table are correctly deleted.
But if I delete a parent node, only related contents for this parent
node are deleted from the i18n table, translated contents for the
child nodes are not deleted.

I see that in the afterDelete() method of TranslateBehavior, a
deleteAll() call is executed, but it take only the current id and it
didn't make a cascading delete.

Have you an idea to improve that?

Hope my question is clear...

Avairet

--

-- 
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 with their CakePHP
related questions.

To unsubscribe from this group, send email to
cake-php+unsubscribe@... For more options, visit this group
at http://groups.google.com/group/cake-php

Ma'moon | 1 Sep 2011 17:24
Picon

Re: View caching with gzip

Nope, you cannot access $this->params from bootstrap since the core libs are not loaded yet to be used in the condition, on the other hand, you can use $_SERVER['REQUEST_URI'] in order to build your condition body.

On Thu, Sep 1, 2011 at 11:00 AM, Teddy Zeenny <teddyzeenny-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Whether I use gzipping depends on the action/view, and not in my entire application as sometimes my actions serve pdf or image content instead of html.  So I gzip based on the action i.e:

if( $this->params['action']=='view' )ob_start('ob_gzhandler'); 

You think I can condition my gzip in boostrap.php ? 

On Thu, Sep 1, 2011 at 5:53 PM, Ma'moon <phpirate-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
put ob_start ('ob_gzhandler') in your bootstrap.php file.


On Thu, Sep 1, 2011 at 10:27 AM, Teddy Zeenny <teddyzeenny-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hey guys,

Does anyone have an idea on how to gzip cached views ?

The way I would do it is use ob_start ('ob_gzhandler') in my
controller's beforeFilter.

The problem is when a view is cached, the beforeFilter is no longer
called.

--
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 with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php

--
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 with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php

--
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 with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php

--
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 with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php

Gmane