Re: Global functions

2012-04-04 Thread luca capra
Sorry I've not understand what the problem is. The select doesn't prepopulate well? Try checking what the value of debug( $this->request->data('Patient.bloodgroup') ); If it is a text value you need to give the right key to the select $_bloodgroup = array_flip( $bloodgroup ); echo $this->For

Generating sitemap

2012-04-04 Thread jmail
I have all ready found articles in Bakery about generating sitemap and robots in CakePHP. But all of them are connected with Cake 1.x Can someone explain me how to generate sitemap and robots in cake 2.x or just give me an advice how to find those information regards jmail -- Our newest si

Re: Moduling

2012-04-04 Thread tomas rei
thanks! On Apr 5, 3:16 am, Vitor Pacheco wrote: > Use plugins to do this... > > http://book.cakephp.org/2.0/en/plugins.html#creating-your-own-plugins > > 2012/4/4 tomas rei > > > > > > > > > > > Hello, > > > I would like to create a cakePHP application having different modules > > like - Events,

Re: Moduling

2012-04-04 Thread Allan Douglas
Hey, look for App:uses() on the api. Maybe this method can help you. 2012/4/4 Vitor Pacheco : > Use plugins to do this... > > http://book.cakephp.org/2.0/en/plugins.html#creating-your-own-plugins > > 2012/4/4 tomas rei >> >> Hello, >> >> I would like to create a cakePHP application having differe

Re: Moduling

2012-04-04 Thread Vitor Pacheco
Use plugins to do this... http://book.cakephp.org/2.0/en/plugins.html#creating-your-own-plugins 2012/4/4 tomas rei > Hello, > > I would like to create a cakePHP application having different modules > like - Events, Poll, etc. > Each module will have more than one database tables. > Each module

Re: Moduling

2012-04-04 Thread Allan Douglas
Man, i think this no is possible. But you can try import this directory on controller. 2012/4/4 tomas rei : > Hello, > > I would like to create a cakePHP application having different modules > like - Events, Poll, etc. > Each module will have more than one database tables. > Each module may have m

$this->Session->read() is returning loding2.gif

2012-04-04 Thread Sdn ngp
Hello Friends, Can any one help me to solve the proble? I have written a code in app controller. to write the value in session in beforeFilter() //$this->params['pass'][0] -> 87445d5sd54dsd554 if(!empty($this->params['pass']) && strlen($this->params['pass'][0]) > 6) {

Moduling

2012-04-04 Thread tomas rei
Hello, I would like to create a cakePHP application having different modules like - Events, Poll, etc. Each module will have more than one database tables. Each module may have more than one controller. So i want to have a separate folder for each module within models folder, like - /app/models/e

call a function from a view

2012-04-04 Thread marcogo
hello i want to call a function, from a view, passing an id and get back an array with some data reads from a table? where i can declare this function? thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://as

Saving Nested Models

2012-04-04 Thread GoneShootin
This problem is beating me into a pulp, and if I could solve it I'd really be making headway on my app. Currently I have working the following type of relationship Contact "belongsTo" Location Location "hasMany" Contact ie - contacts.location_id = locations.id This works for all CRUD operations

Re: Global functions

2012-04-04 Thread JunLe Li
why not use array? $output = array('Rh A+', 'Rh A-','Rh B+', 'Rh B-', 'Rh AB+', 'Rh AB-'); > if (isset($output[ $patient['Patient']['bloodgroup'] ])) { > echo $output[ $patient['Patient']['bloodgroup'] ]; > } > -- liju...@gmail.com | Public Key

Re: Problem in edit-view with data from a HABTM-relationship

2012-04-04 Thread Mike Griffin
> Wonderful, > > fully working incl. selected option: > > >            echo > $this->Form->input('Detail'.$counter.'DetailType'.'name', array( >     'options' => $detail_types, >     'label' => 'Detail Art ', >     'selected' => > $thi

Re: Problem in edit-view with data from a HABTM-relationship

2012-04-04 Thread Wall-D
Am Mittwoch, 4. April 2012 15:35:26 UTC+2 schrieb Mike Griffin: >> >> On Wed, Apr 4, 2012 at 13:50, Wall-D wrote: >> > Yes, it should be the list of all detail-types with the correct one >> > selected. >> > >> > in the controller I'm passing them to the view: >> > '$detail_types = $this-

Re: Problem in edit-view with data from a HABTM-relationship

2012-04-04 Thread Mike Griffin
On Wed, Apr 4, 2012 at 13:50, Wall-D wrote: > Yes, it should be the list of all detail-types with the correct one > selected. > > in the controller I'm passing them to the view: > '   $detail_types = $this->Device->Detail->DetailType->find('list', > array('order' => 'DetailType.name ASC')); >

Re: Problem in edit-view with data from a HABTM-relationship

2012-04-04 Thread Wall-D
Am Mittwoch, 4. April 2012 11:40:10 UTC+2 schrieb Mike Griffin: > > On Tue, Apr 3, 2012 at 14:59, Wall-D wrote: > > Here ist the problem: > > > > here ist the code from edit.ctp > > > > > $counter = 0; > >

Re: mysql gone away

2012-04-04 Thread Sandeep Kumar
Miles, it is in cli... On Wed, Apr 4, 2012 at 4:14 AM, Miles J wrote: > Are these PDFs being created in the CLI/cron? If not, they should be. > > > On Tuesday, April 3, 2012 12:54:27 AM UTC-7, Sandy wrote: >> >> HI There, >> >> I'm facing a big problem with cakephp 1.2 >> >> first one is that c

Re: Global functions

2012-04-04 Thread euromark
you can also use some kind of enum like I do: http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-attributes/ echo Patient::bloodgroups($patient['Patient']['bloodgroup']); anywhere in your application (in this case the view template) Am Mittwoch, 4. April 2012 12:14:21 UTC+2 s

Re: Global functions

2012-04-04 Thread luca capra
Il 04/04/2012 11:27, alexkd ha scritto: In my patient form one blood group select box. ... Can I place a function globally to return bloodgroup when id is passed? If so what can I do for it? Thanks. You can move the code in a Helper book.cakephp.org/2.0/en/views/helpers.html#creating-helpers O

Re: Problem in edit-view with data from a HABTM-relationship

2012-04-04 Thread Mike Griffin
On Tue, Apr 3, 2012 at 14:59, Wall-D wrote: > Here ist the problem: > > here ist the code from edit.ctp >    >                             $counter = 0; >                 foreach ($this->data['Detail'] as $detail): >                 echo > $

Global functions

2012-04-04 Thread alexkd
In my patient form one blood group select box. My view.ctp is as follows, Can I place a function globally to return bloodgroup when id is passed? If so what can I do for it? Thanks. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Qu