So im attempting to fiddle with it till it works, Trying Contain
dosn't seem to work.  If i remove the contain part of the array from
this it returns all the 'physical' event types (its an enviromental
volunteering site) but if i leave it in as below, no results at all.
some of the events def have a postcode that matches.

Any hints?

        $this->paginate['Tagged'] = array(
                                        'model' => 'Content',
                                        'tagged',
                                         'contain'=>array(
                                'Content'=>array(
                                    'conditions' => array('Content.postcode 
like' =>
"%" . $this->data['Events']['postcode'] . "%"),
                                                        
'fields'=>array('Content.id','Content.event_date','Content.title','Content.area',
'Content.hours','Content.postcode', 'Content.slug')
                                                                )
                                        ),
                                        'by' => array('physical'));

                                $events = $this->paginate('Tagged',$filter);

On Aug 3, 2:39 pm, "#2Will" <[email protected]> wrote:
> Thanks Andy, I tried correcting that typo but it still not working.
>
> That wasn't cut and paste, just (badly) paraphrasing the things ive
> been trying.
>
> Thanks for looking though.  Im quite stuck!
>
> On Aug 3, 2:17 pm, Andy Dirnberger <[email protected]> wrote:
>
> > There's an error in your syntax. The line should be $filter =
> > array('Event.postcode' => '4883');
>
> > On Aug 2, 11:24 pm, "#2Will" <[email protected]> wrote:
>
> > > Sorry but i seem to be struggling today.  Ive got my index page
> > > showing my paginated list and filtering by tag, but what if i want to
> > > add in more filters?
>
> > > so  $filter = array( 'Event.postcode' = '4883')
>
> > > $this->paginate['Tagged'] = array(
> > >                         'model' => 'Event',
> > >                         'tagged',
> > >                         'by' => $this->passedArgs['by']);
> > >                 $recipes = $this->paginate('Tagged', $filter);
>
> > > the filter is just ignored.
>
> > > Surely im just doing something silly? You must be able to add more
> > > conditions right?
>
> > > Thanks,
>
> > > a confused will.
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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