Helper and different servers
I have one server with php 5.3.2(ubuntu) and one with 5.3.14(mamp) For some reason I started getting html helper not found on the production server, but no problem locally. After clearing cache - nothing Then I added the following line in the appcontroller.php public $helpers = array('Html','Form'); And it worked. My question is why would it work on my local test, and fail on production? I know it is a different version of PHP, but it seems odd. Thank you. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Themes
That works, but currently, is not the solution.. I'll explain. I tried: 1. app/View/Themed/corporate/webroot/css/main.css No work then I tried 2. app/Webroot/theme/corporate/css/main.css Worked. The #1 solution should have worked, I realize that now - I built an app from scratch to test. So. Something in my route, or appcontroller is breaking the full functionality of themes. I am going to rebuild the application by dragging over each component and testing the themes as I go along to find out what is breaking the theme. If I find the culprit, i'll post it. Thanks. On Sat, Sep 29, 2012 at 11:03 AM, lowpass wrote: > The file should be at: > > app/View/Themed/corporate/webroot/css/main.css > > Is that the case? > > On Sat, Sep 29, 2012 at 11:10 AM, hill180 wrote: > > For the first time, I have to use themes in a project. > > > > I am using Cakephp 2.1 > > > > In the before filter of the app controller I have the following: > > > > $this->theme = 'corporate'; > > > > I have the views under > > > > app/view/themed/corporate/layout/default.ctp > > > > This is working fine.. > > > > My problem is the webroot. > > > > I used > > > > //main.css is under webroot/themed/corporate/css/main.css > > Html->css('main'); ?> > > > > > > The page is rendered with: > > > > //file not > > found > > > > I can manually put in the link > > > > > rel="stylesheet" type="text/css" /> > > becomes > > type="text/css" > > /> //good > > > > > > > > I thought when I used the HTML helper it was supposed to properly > identify > > the theme and update the link accordingly. > > > > Am I wrong in that assumption? > > > > Thanks! > > > > > > -- > > Like Us on FacekBook https://www.facebook.com/CakePHP > > Find us on Twitter http://twitter.com/CakePHP > > > > --- > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com. > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com. > > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > > > > -- > Like Us on FacekBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com. > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > -- Like Us on FacekBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Themes
For the first time, I have to use themes in a project. I am using Cakephp 2.1 In the before filter of the app controller I have the following: $this->theme = 'corporate'; I have the views under app/view/themed/corporate/layout/default.ctp This is working fine.. My problem is the webroot. I used //main.css is under webroot/themed/corporate/css/main.css Html->css('main'); ?> The page is rendered with: http://app.avilandiamonds.com/css/main.css>" /> //file not found I can manually put in the link becomes //good I thought when I used the HTML helper it was supposed to properly identify the theme and update the link accordingly. Am I wrong in that assumption? Thanks! -- Like Us on FacekBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Model Associations
Solved: But I don't know why. This but this code puts the data where I want it, and without the index error: 'Contact' => array( 'className'=>'CONTACT', 'foreignKey' => false, 'finderQuery' => 'SELECT Account.AccountID as Contact__ACCOUNT_ID, contact.contact_full_name as Contact__CONTACT_FULL_NAME FROM CONTACTS AS contact LEFT JOIN Accounts AS Account ON contact.account_id=Account.account WHERE Account.AccountID = {$__cakeID__$}' ) On Thu, May 24, 2012 at 9:38 AM, hill180 wrote: > Ok. > Sorry for the last email. > > it made no sense: > > What I was trying to say is that I am getting > *Notice* (8): Undefined index: Contacts > > I copied the SQL Dumb (from the finderquery) in MSSQL Manager and it works. > > Just doing a debug($results) which is the results of the find query. > > Also it gets me 3 undefined Index errors, which matches the records for > this account. > > Thank you. > > > On Thu, May 24, 2012 at 10:33 AM, hill180 wrote: > >> Thank you so much. I think I am 99% there. >> >> Get the following error three times, (that is actually how many contacts >> are in the DB for the customer I was looking up. >> >> debug($results); >> >> *Notice* (8): Undefined index: Contacts [* >> CORE\Cake\Model\Datasource\DboSource.php*, line *1412*] >> Code Context >> >> }} else { >> $this->_mergeAssociation($row, $fetch, $association, $type, $selfJoin); >> >> $data = array( >> 'TblAccount' => array( >> ), >> 'Address' => array( >> ), >> 'Contacts' => array( >> ) >> ) >> $merge = array( >> (int) 0 => array( >> ), >> (int) 1 => array( >> ), >> (int) 2 => array( >> ) >> ) >> $association = 'Contacts' >> $type = 'hasMany' >> $selfJoin = false >> $i = (int) 1 >> $row = array( >> (int) 0 => array( >> ) >> ) >> $insert = array() >> >> DboSource::_mergeAssociation() - CORE\Cake\Model\Datasource\DboSource.php, >> line 1412 >> DboSource::queryAssociation() - CORE\Cake\Model\Datasource\DboSource.php, >> line 1274 >> DboSource::read() - CORE\Cake\Model\Datasource\DboSource.php, line 1087 >> Sqlserver::read() - CORE\Cake\Model\Datasource\Database\Sqlserver.php, line >> 600 >> Model::find() - CORE\Cake\Model\Model.php, line 2698 >> TblAccountsController::view() - APP\Controller\TblAccountsController.php, >> line 28 >> ReflectionMethod::invokeArgs() - [internal], line ?? >> Controller::invokeAction() - CORE\Cake\Controller\Controller.php, line 485 >> Dispatcher::_invoke() - CORE\Cake\Routing\Dispatcher.php, line 103 >> Dispatcher::dispatch() - CORE\Cake\Routing\Dispatcher.php, line 85 >> [main] - APP\webroot\index.php, line 92 >> >> >> >> >> >> >> >> Co >> >> I copied the SQL Dumb into MS SQL query and it gave me the records I >> needed. >> >> Thanks! >> >> >> On Thu, May 24, 2012 at 9:38 AM, Mike Griffin wrote: >> >>> On Thu, May 24, 2012 at 3:14 PM, hill180 wrote: >>> > Yes. >>> > >>> > As a disclaimer, I didn't write the original schema. >>> > >>> > Account_ID is for the systems account number (primary key) >>> > Account is for the logical account number (used by the company) >>> > >>> > The Account Address table use the Account_ID as the foreign key, but >>> the >>> > Contact Table uses the Account Number as the foreign key. >>> > >>> > SQLDUMP: >>> > >>> > SELECT [CONTACT_FULL_NAME] AS [Contact__CONTACT_FULL_NAME], >>> > [Contact].[CONTACT_FIRST_NAME] AS [Contact__CONTACT_FIRST_NAME] FROM >>> > [CONTACTS] AS [Contact] WHERE [Contact].[Account_ID] = >>> [Accounts].[Account] >>> > >>> > >>> > error: >>> > >>> > Error: SQLSTATE[42000]: [Microsoft][SQL Server Native Client >>> > 11.0][SQL Server]The multi-part identifier "Accounts.Account" could >>> not be >>> > bound. >>> > >>> >>> Right so. >>> >>> You can do it this way instead. Remove the conditions array from the >>> model association and put this in: >>> 'finderQuery' => 'SEL
Re: Model Associations
Ok. Sorry for the last email. it made no sense: What I was trying to say is that I am getting *Notice* (8) : Undefined index: Contacts I copied the SQL Dumb (from the finderquery) in MSSQL Manager and it works. Just doing a debug($results) which is the results of the find query. Also it gets me 3 undefined Index errors, which matches the records for this account. Thank you. On Thu, May 24, 2012 at 10:33 AM, hill180 wrote: > Thank you so much. I think I am 99% there. > > Get the following error three times, (that is actually how many contacts > are in the DB for the customer I was looking up. > > debug($results); > > *Notice* (8): Undefined index: Contacts [* > CORE\Cake\Model\Datasource\DboSource.php*, line *1412*] > Code Context > > }} else { > $this->_mergeAssociation($row, $fetch, $association, $type, $selfJoin); > > $data = array( > 'TblAccount' => array( > ), > 'Address' => array( > ), > 'Contacts' => array( > ) > ) > $merge = array( > (int) 0 => array( > ), > (int) 1 => array( > ), > (int) 2 => array( > ) > ) > $association = 'Contacts' > $type = 'hasMany' > $selfJoin = false > $i = (int) 1 > $row = array( > (int) 0 => array( > ) > ) > $insert = array() > > DboSource::_mergeAssociation() - CORE\Cake\Model\Datasource\DboSource.php, > line 1412 > DboSource::queryAssociation() - CORE\Cake\Model\Datasource\DboSource.php, > line 1274 > DboSource::read() - CORE\Cake\Model\Datasource\DboSource.php, line 1087 > Sqlserver::read() - CORE\Cake\Model\Datasource\Database\Sqlserver.php, line > 600 > Model::find() - CORE\Cake\Model\Model.php, line 2698 > TblAccountsController::view() - APP\Controller\TblAccountsController.php, > line 28 > ReflectionMethod::invokeArgs() - [internal], line ?? > Controller::invokeAction() - CORE\Cake\Controller\Controller.php, line 485 > Dispatcher::_invoke() - CORE\Cake\Routing\Dispatcher.php, line 103 > Dispatcher::dispatch() - CORE\Cake\Routing\Dispatcher.php, line 85 > [main] - APP\webroot\index.php, line 92 > > > > > > > > Co > > I copied the SQL Dumb into MS SQL query and it gave me the records I > needed. > > Thanks! > > > On Thu, May 24, 2012 at 9:38 AM, Mike Griffin wrote: > >> On Thu, May 24, 2012 at 3:14 PM, hill180 wrote: >> > Yes. >> > >> > As a disclaimer, I didn't write the original schema. >> > >> > Account_ID is for the systems account number (primary key) >> > Account is for the logical account number (used by the company) >> > >> > The Account Address table use the Account_ID as the foreign key, but the >> > Contact Table uses the Account Number as the foreign key. >> > >> > SQLDUMP: >> > >> > SELECT [CONTACT_FULL_NAME] AS [Contact__CONTACT_FULL_NAME], >> > [Contact].[CONTACT_FIRST_NAME] AS [Contact__CONTACT_FIRST_NAME] FROM >> > [CONTACTS] AS [Contact] WHERE [Contact].[Account_ID] = >> [Accounts].[Account] >> > >> > >> > error: >> > >> > Error: SQLSTATE[42000]: [Microsoft][SQL Server Native Client >> > 11.0][SQL Server]The multi-part identifier "Accounts.Account" could not >> be >> > bound. >> > >> >> Right so. >> >> You can do it this way instead. Remove the conditions array from the >> model association and put this in: >> 'finderQuery' => 'SELECT Contact.name FROM contacts AS Contact LEFT >> JOIN accounts AS Account ON Contact.account_id=Account.account WHERE >> Account.AccountID = {$__cakeID__$}' >> >> You can edit the SELECT query to return whatever values you want but >> leave in the {$__cakeID__$} bit as it is the value of the primary key. >> >> I hope this makes sense. >> >> Mike. >> >> -- >> 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Model Associations
Thank you so much. I think I am 99% there. Get the following error three times, (that is actually how many contacts are in the DB for the customer I was looking up. debug($results); *Notice* (8) : Undefined index: Contacts [* CORE\Cake\Model\Datasource\DboSource.php*, line *1412*] Code Context }} else { $this->_mergeAssociation($row, $fetch, $association, $type, $selfJoin); $data = array( 'TblAccount' => array( ), 'Address' => array( ), 'Contacts' => array( ) ) $merge = array( (int) 0 => array( ), (int) 1 => array( ), (int) 2 => array( ) ) $association = 'Contacts' $type = 'hasMany' $selfJoin = false $i = (int) 1 $row = array( (int) 0 => array( ) ) $insert = array() DboSource::_mergeAssociation() - CORE\Cake\Model\Datasource\DboSource.php, line 1412 DboSource::queryAssociation() - CORE\Cake\Model\Datasource\DboSource.php, line 1274 DboSource::read() - CORE\Cake\Model\Datasource\DboSource.php, line 1087 Sqlserver::read() - CORE\Cake\Model\Datasource\Database\Sqlserver.php, line 600 Model::find() - CORE\Cake\Model\Model.php, line 2698 TblAccountsController::view() - APP\Controller\TblAccountsController.php, line 28 ReflectionMethod::invokeArgs() - [internal], line ?? Controller::invokeAction() - CORE\Cake\Controller\Controller.php, line 485 Dispatcher::_invoke() - CORE\Cake\Routing\Dispatcher.php, line 103 Dispatcher::dispatch() - CORE\Cake\Routing\Dispatcher.php, line 85 [main] - APP\webroot\index.php, line 92 Co I copied the SQL Dumb into MS SQL query and it gave me the records I needed. Thanks! On Thu, May 24, 2012 at 9:38 AM, Mike Griffin wrote: > On Thu, May 24, 2012 at 3:14 PM, hill180 wrote: > > Yes. > > > > As a disclaimer, I didn't write the original schema. > > > > Account_ID is for the systems account number (primary key) > > Account is for the logical account number (used by the company) > > > > The Account Address table use the Account_ID as the foreign key, but the > > Contact Table uses the Account Number as the foreign key. > > > > SQLDUMP: > > > > SELECT [CONTACT_FULL_NAME] AS [Contact__CONTACT_FULL_NAME], > > [Contact].[CONTACT_FIRST_NAME] AS [Contact__CONTACT_FIRST_NAME] FROM > > [CONTACTS] AS [Contact] WHERE [Contact].[Account_ID] = > [Accounts].[Account] > > > > > > error: > > > > Error: SQLSTATE[42000]: [Microsoft][SQL Server Native Client > > 11.0][SQL Server]The multi-part identifier "Accounts.Account" could not > be > > bound. > > > > Right so. > > You can do it this way instead. Remove the conditions array from the > model association and put this in: > 'finderQuery' => 'SELECT Contact.name FROM contacts AS Contact LEFT > JOIN accounts AS Account ON Contact.account_id=Account.account WHERE > Account.AccountID = {$__cakeID__$}' > > You can edit the SELECT query to return whatever values you want but > leave in the {$__cakeID__$} bit as it is the value of the primary key. > > I hope this makes sense. > > Mike. > > -- > 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Model Associations
Yes. As a disclaimer, I didn't write the original schema. Account_ID is for the systems account number (primary key) Account is for the logical account number (used by the company) The Account Address table use the Account_ID as the foreign key, but the Contact Table uses the Account Number as the foreign key. SQLDUMP: SELECT [CONTACT_FULL_NAME] AS [Contact__CONTACT_FULL_NAME], [Contact].[CONTACT_FIRST_NAME] AS [Contact__CONTACT_FIRST_NAME] FROM [CONTACTS] AS [Contact] WHERE [Contact].[Account_ID] = [Accounts].[Account] error: Error: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]The multi-part identifier "Accounts.Account" could not be bound. On Thu, May 24, 2012 at 3:28 AM, Mike Griffin wrote: > On Thu, May 24, 2012 at 1:50 AM, hill180 wrote: > > AccountID = AccountID on the Account and the Address for the Account, no > > problems here. > > > > > > The problem is the contacts. > > > > The join is Contact.Account_id = Accounts.Account (not Account_ID) > > > > Error: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL > > Server]The multi-part identifier "Accounts.Account" could not be bound. > > > > Are you saying that the Accounts.Account and Accounts.AccountID are > different fields and have different values? > > What's the actual SQL statement that is being created and causes the error? > > Mike. > > -- > 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Model Associations
*Cake *PHP 2. *public *$useTable = 'Accounts'; /** * Primary key field * * *@var* string */ *public *$primaryKey = 'AccountID'; *public *$hasMany = *array*( 'Address' => *array*( 'className' => 'AccountAddress', 'foreignKey' => 'AccountID', 'conditions' => '', 'fields' => '', 'order' => '' ), 'Contact' => *array*( 'className' => 'CONTACT', 'foreignKey' => false, 'conditions'=>*array*( 'Contact.ACCOUNT_ID = Accounts.Account') ) ); The Database was from an existing system. AccountID = AccountID on the Account and the Address for the Account, no problems here. The problem is the contacts. The join is Contact.Account_id = Accounts.Account (not Account_ID) *Error: *SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]The multi-part identifier "Accounts.Account" could not be bound. This join will always exist so I want to create it in the model class. I am not able to change any DB Structure. Thanks. -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: i need changepassword validations in cakephp
Are you talking about complexity rules? On Wed, May 23, 2012 at 2:59 AM, Roopa Mani C wrote: > i need changepassword validations in cakephp > > -- > 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Yii Framework
There might be a bit of a misunderstanding. Points were not to highlight what was better, just what Cake has. I also believe YII is a solid framework. On the documentation, I found the API docs were excellent but from a manual side "definitive guide", lacking. I'll give an example. I had to setup session to store in the DB "CDbHttpSession" API is easy to find, but on the manual side (definitive guide), there is no reference. On Wed, May 23, 2012 at 4:00 AM, Steve Found wrote: > On 23/05/12 03:35, hill180 wrote: > >> This is not a holy war statement. >> >> After looking at Yii, getting the two books and reading and watching a >> lot of the tutorials, making a small app in Yii. I think I am going to >> stay with Cake. >> >> 1. Cakephp's Documentation is amazing. >> 2. Great Community >> 3. Familiar with CakePHP >> 4. CakePHP is a solid framework. >> >> I like Yii's Search Widgets and Ajax, but I think I would prefer doing >> the Ajax by hand. Don't need to worry about Composite Keys. >> >> What are your thoughts on Yii? Tried Yii? Please be constructive.. I >> know this forum is bias to CakePHP, but I just want a general opinion if >> you tried 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@**googlegroups.comFor >> more options, visit this group at >> http://groups.google.com/**group/cake-php<http://groups.google.com/group/cake-php> >> > Like you, I also tried Yii and came back to CakePHP. Apart from point 2 > though, I do not totally agree with your points. Yii also has excellent > documentation and is also a solid framework. > > I would go so far as to suggest that in comparison to Cake 1.x, Yii is > probably not a comparative framework since Yii does not support PHP 4 and > utilises Lazy Loading of classes which is a feature that affects Cake 1.x > in respect to comparative speed ( speed is a criticism that is always > levelled at Cake in addition to being 'restrictive' ). Apart from these I > found the two to be remarkably similar. Both have model behaviours, both > have Components, both have Plugins, both have themes, views and layouts and > since Cake 2.0 cake also has lazy loading and since 2.1 also has the > ability to wrap layouts in other layouts. > > I do prefer the Models of Yii in that each model object represents a > record and you get an object back instead of Cake's arrays ( a feature on > Cake 3.0's roadmap ). > > The Widgets of Yii, I both love and hate. From a developers point of view > they are great since you just use it and it sorts out the Javascript you > need in the header and body without you needing to worry about it. From a > web designers point of view however, they are not so good. The whole point > of MVC is supposed to be that web designers can work on views whilst > developers sort out models and controllers. In Yii therefore, web designers > need to have a detailed knowledge of Yii widgets which often require a lot > of configuration to get them how you want unless you are happy with what > you are given out of the box. > > All in all, I do not think Cake 2.x and Yii are too far apart and each has > it's strengths and weaknesses depending on your viewpoint. > > > -- > 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@**googlegroups.comFor > more options, visit this group at > http://groups.google.com/**group/cake-php<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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Yii Framework
This is not a holy war statement. After looking at Yii, getting the two books and reading and watching a lot of the tutorials, making a small app in Yii. I think I am going to stay with Cake. 1. Cakephp's Documentation is amazing. 2. Great Community 3. Familiar with CakePHP 4. CakePHP is a solid framework. I like Yii's Search Widgets and Ajax, but I think I would prefer doing the Ajax by hand. Don't need to worry about Composite Keys. What are your thoughts on Yii? Tried Yii? Please be constructive.. I know this forum is bias to CakePHP, but I just want a general opinion if you tried 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Pagination
Here is the real example I am trying. The webpage has a list of work order that are open. Paginator->sort('Work Order ID','WorkOrder.id') ?> //works Paginator->sort('Customer','Customer.name') ?> //works Paginator->sort('City','MainCity.name') ?> //no worky Customer Model: var $belongsTo = array( 'main_city' => array( 'className' => 'City', 'foreignKey' => 'main_city_id', 'conditions' => '', 'fields' => '', 'order' => '' ), 'billing_city' => array( 'className' => 'City', 'foreignKey' => 'billing_city_id', 'conditions' => '', 'fields' => '', 'order' => '' ),... var $hasMany = array( 'WorkOrder' => array( 'className' => 'WorkOrder', 'foreignKey' => 'customer_id', 'dependent' => false, ), Work Order Model var $belongsTo = array( 'Customer' => array( 'className' => 'Customer', 'foreignKey' => 'customer_id', 'conditions' => '', 'fields' => '', 'order' => '' ), City Model var $hasMany = array( 'MainCity' => array( 'className'=>'Customer', 'foreignKey'=> 'main_city_id', 'dependent'=>true, ), 'BillingCity' => array( 'className'=>'Customer', 'foreignKey'=> 'billing_city_id', 'dependent'=>true, )); -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Pagination
You know my example was a different then my actual code (I know I should have just used it) I have two cities per book. IE main_city_id (where it was written) billing_city_id (where the author wants to get paid) How do I distinguish them? I can't use City.name Thanks. On Thu, Apr 26, 2012 at 3:13 PM, jeremyharris wrote: > If it's hasMany then I think your relationship should be: > > var $hasMany = array( > 'Book' => array( > 'className' => 'Book', > 'foreignKey' => 'city_id', // books table has city_id > > 'conditions' => '', > 'fields' => '', > 'order' => '' > )); > > In that case, Book belongsTo City > > class Book extends AppModel { > var $belongsTo = array('City', 'Author'); > } > > Then you can paginate like the example I had above since it will LEFT join > the city models for all the books, as long as you contain the city model: > > // in books controller > $this->paginate = array( > 'contain' => array('City', 'Author'); > ); > $this->paginate('Book'); // paginate from the book model to be able to > sort by Book, Author or City > > > On Thursday, April 26, 2012 3:06:34 PM UTC-7, Hill180 wrote: >> >> City hasMany books, books only have one author. >> >> City.name didn't work >> >> var $hasMany = array( >> 'Book' => array( >> 'className' => 'Book', >> 'foreignKey' => 'book_id', >> 'conditions' => '', >> 'fields' => '', >> 'order' => '' >> )); >> >> On Thu, Apr 26, 2012 at 7:46 AM, jeremyharris wrote: >> >>> Is City a hasOne or belongsTo relationship? If so, and your find code is >>> using contain or recursive to include those in the results, you can do this: >>> >>> $this->Paginator->sort('Where Written', 'City.name'); >>> >>> Check your data and SQL queries to see if it's joined that way. >>> >>> >>> On Wednesday, April 25, 2012 4:29:26 PM UTC-7, Hill180 wrote: >>>> >>>> Trying to use the paginator in the view >>>> >>>> I have an Author who is has a Book and where the "book" was written ( >>>> book_id.name, city_id.name) >>>> Author sort works, title sort work, but not the sort for city_id. I can >>>> sort by the id, but obviously this won't work because >>>> the id has nothing to do with the name of the city. >>>> >>>> >>>> >>>> Paginator->sort('**Author**', 'name'); ?> >>>> Paginator->sort('Book', 'title.name'); ?> >>>> Paginator->sort('Where Written', 'title.city_id'); >>>> ?> (sorts, but the names are not sorted because >>>> it is using the id) >>>> >>>> need something like this >>>> Paginator->sort('Where Written', ' >>>> title.city_id.name'); ?> //does not work. >>>> >>>> Is there a way to get this to work, or is it a customer pagination? >>>> >>>> thanks.. >>>> j >>>> >>> -- >>> 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@**googlegroups.comFor >>> more options, visit this group at >>> http://groups.google.com/**group/cake-php<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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Pagination
City hasMany books, books only have one author. City.name didn't work var $hasMany = array( 'Book' => array( 'className' => 'Book', 'foreignKey' => 'book_id', 'conditions' => '', 'fields' => '', 'order' => '' )); On Thu, Apr 26, 2012 at 7:46 AM, jeremyharris wrote: > Is City a hasOne or belongsTo relationship? If so, and your find code is > using contain or recursive to include those in the results, you can do this: > > $this->Paginator->sort('Where Written', 'City.name'); > > Check your data and SQL queries to see if it's joined that way. > > > On Wednesday, April 25, 2012 4:29:26 PM UTC-7, Hill180 wrote: >> >> Trying to use the paginator in the view >> >> I have an Author who is has a Book and where the "book" was written ( >> book_id.name, city_id.name) >> Author sort works, title sort work, but not the sort for city_id. I can >> sort by the id, but obviously this won't work because >> the id has nothing to do with the name of the city. >> >> >> >> Paginator->sort('**Author', 'name'); ?> >> Paginator->sort('Book', 'title.name'); ?> >> Paginator->sort('Where Written', 'title.city_id'); >> ?> (sorts, but the names are not sorted because >> it is using the id) >> >> need something like this >> Paginator->sort('Where Written', ' >> title.city_id.name'); ?> //does not work. >> >> Is there a way to get this to work, or is it a customer pagination? >> >> thanks.. >> j >> > -- > 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Pagination
1.3 On Wed, Apr 25, 2012 at 5:38 PM, euromark wrote: > what version are you using? > because in 2.x it should be the other way around: > > sort($key, $title) > > please always mention your cake version > > > > Am Donnerstag, 26. April 2012 01:29:26 UTC+2 schrieb Hill180: > >> Trying to use the paginator in the view >> >> I have an Author who is has a Book and where the "book" was written ( >> book_id.name, city_id.name) >> Author sort works, title sort work, but not the sort for city_id. I can >> sort by the id, but obviously this won't work because >> the id has nothing to do with the name of the city. >> >> >> >> Paginator->sort('**Author', 'name'); ?> >> Paginator->sort('Book', 'title.name'); ?> >> Paginator->sort('Where Written', 'title.city_id'); >> ?> (sorts, but the names are not sorted because >> it is using the id) >> >> need something like this >> Paginator->sort('Where Written', ' >> title.city_id.name'); ?> //does not work. >> >> Is there a way to get this to work, or is it a customer pagination? >> >> thanks.. >> j >> > -- > 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Pagination
Trying to use the paginator in the view I have an Author who is has a Book and where the "book" was written ( book_id.name, city_id.name) Author sort works, title sort work, but not the sort for city_id. I can sort by the id, but obviously this won't work because the id has nothing to do with the name of the city. Paginator->sort('Author', 'name'); ?> Paginator->sort('Book', 'title.name'); ?> Paginator->sort('Where Written', 'title.city_id'); ?> (sorts, but the names are not sorted because it is using the id) need something like this Paginator->sort('Where Written', 'title.city_id.name'); ?> //does not work. Is there a way to get this to work, or is it a customer pagination? thanks.. j -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Find with $hasAndBelongsToMany
I saw that page in the manual, but glanced over the answer. Thanks! Shaz, this is what I did to solve the problem if you are still having problems. $this->Author->bindModel(array( 'hasAndBelongsToMany' => array( 'Category' => array('conditions'=>array('Category.id'=>'5')) ))); $this->Author->find('all', array('conditions'=>array('Author.id'=>'2'))); On Mon, May 30, 2011 at 1:06 PM, Shaz wrote: > I've just posted a similiar query! > > Googling around has given me the bindModel() method - which you can > read at the bottom of the page here: > > http://book.cakephp.org/view/1044/hasAndBelongsToMany-HABTM > > But I wasn't able to get it to work for me. There's also a method > using manual joins and creating models for the join table and querying > it - haven't tried either of the two and can't say if they'll work. > > On May 30, 5:14 pm, hill180 wrote: > > I have three models > > Authors > > Books (hasandbelongstomany category) > > Category > > > > They are properly configured for $hasAndBelongsToMany (books/category) > > relationship. > > > > I need to get all books by an author in a certain category (5 in this > > example) > > > > Obviously the category id is not in the authors table so I am trying to > > figure out how to reference the category id. I have tried below to no > > avail. > > > > $this->Category->Author->find('all', > > array('conditions'=>array('Category.id'=>'5', 'Author.id'=>'2'))); > > or > > $this->Author->find('all', array('conditions'=>array('Category.id'=>'5', > > 'Author.id'=>'2'))); > > > > This is the first time I have done a HABTM query. (searched manual and > and > > a couple cake books - no help) > > > > Thanks! > > -- > 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Find with $hasAndBelongsToMany
I have three models Authors Books (hasandbelongstomany category) Category They are properly configured for $hasAndBelongsToMany (books/category) relationship. I need to get all books by an author in a certain category (5 in this example) Obviously the category id is not in the authors table so I am trying to figure out how to reference the category id. I have tried below to no avail. $this->Category->Author->find('all', array('conditions'=>array('Category.id'=>'5', 'Author.id'=>'2'))); or $this->Author->find('all', array('conditions'=>array('Category.id'=>'5', 'Author.id'=>'2'))); This is the first time I have done a HABTM query. (searched manual and and a couple cake books - no help) Thanks! -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Composite Primary Keys
>From what I have read, I know that Cakephp does not support composite primary >keys. And later the posts go into tags, but I need a push in the right >directions. I have Tickets 1-100 that go out for each day. The user buys a ticket for a day and the system will process the payment and return the ticket #. So the ticket# + Day = Primary Key. How would I accomplish this with CakePHP, or at least prevent duplicates? Thanks! -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Forum Is A Free For All?
I did notice some really basic questions that a tutorial could have answered, in those cases, I would recommend what some members did, point them right to the tutorials. As a community it would be better then a blanket RTFM, in my humble opinion. I know I could have been part of those "people" seeking help as I am new to the forum, although I am new to CakePHP, I am not new to web coding. I did my due diligence with the manual website, and Google (Bing.. :) Ok I never used Bing, but if I did it would have been the same Google Results). I even posted my code when relevant. Side Note: The two books I have on CakePHP are now dated with support for 1.2 with many of elements of the API changed. Hard to understand a change log when you don't understand the fundamentals. The best teacher was Andrew Perk on youtube.com. - H On Feb 4, 2011, at 12:46 PM, Dave Maharaj wrote: > I do not know if it’s just me, but I have been on the group 2 and a half > years now and when I first joined I got told “how to ask a question” if you > have code show it, errors show it, if you cannot figure something out show > what your code is now, what you have tried. > > Lately the board is full of “I don’t know how show me” and not sure if anyone > has noticed this also but this feeding a stry dog only brings the dog back > for more and more. And people just keep going on and on with it. Last week I > have pretty much started just opening email , seeing 26 emails and straight > to the garbage. > > Help group yes! Help me with this please, I can’t seem to figure out how > to……. I have tried… looked … > > I’m building site, no how to do so help show me help now and when your done > ftp it up for me too? I just can’t get over that when a question gets asked > now no code not even showing an attempt and the post gets 20 responses. > Whats the point of learning it if all you have to do is get 20 people doing > it for you. > > Today: > So I need capcha confirm for in submit in popup to send show me how! > > Tomorrow: > AJAX Logon show me how > > Sunday: > Good job guys take the day off. > > Moday: > TBD…. > > Cheers everyone J > > -- > 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: CSS Pagination Indicator
Ok another question .. just a gee wiz If all CSS content values are required to be escaped, why not escape it in the core Cakephp 1.3.7 package? Thanks! On Feb 3, 2011, at 10:22 AM, cricket wrote: > On Thu, Feb 3, 2011 at 11:31 AM, hill180 wrote: >> In the CSS is have: >> th a.asc:after { >>content: ' ⇣'; >> } > > You have to escape the character in CSS's content value. Use backslash > followed by the unicode position. So, \2193 for this down arrow. See > here: > > http://www.blooberry.com/indexdot/html/tagpages/entities/arrow.htm > > -- > 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: CSS Pagination Indicator
The escaping worked, thanks! th a.asc:after { content: '\21a5'; } th a.desc:after { content: '\21a7'; } On Feb 3, 2011, at 10:22 AM, cricket wrote: > On Thu, Feb 3, 2011 at 11:31 AM, hill180 wrote: >> In the CSS is have: >> th a.asc:after { >>content: ' ⇣'; >> } > > You have to escape the character in CSS's content value. Use backslash > followed by the unicode position. So, \2193 for this down arrow. See > here: > > http://www.blooberry.com/indexdot/html/tagpages/entities/arrow.htm > > -- > 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
CSS Pagination Indicator
In the CSS is have: th a.asc:after { content: ' ⇣'; } When a pagination link is clicked: it should look like this: Before NAME AFTER NAME ⇣ But what I am getting is NAME ⇣ I know it has something to do with the encoding, just don't know where. Thanks! PS (mac/MAMP/chrome&safari) -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: problems in Cake
open your cmd and type php -v if you still get the error, you need to add the php binary to your windows path. is you are using wamp is should be c:\wamp\bin\php\php5.3.0 On Feb 3, 2011, at 8:40 AM, goluhaque wrote: > After adding the path to cake.bat to the PAth in the environment variables, > when I type 'cake' in my command prompt, it says that php is not recognized > as an internal or external command. What am I doing wrong? > > -- > 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: A facelift for the CakePHP Book
Larry, Thank you for the effort. (don't take my comment as a dig - never meant as one) Love the new look. on a side note, we'll never get rid of script kiddies or real black hats will we :). On Feb 3, 2011, at 8:17 AM, Larry E. Masters wrote: > We are in process of moving servers over the next few days so be patient. > > Another thing that has been happening this week is what I would call an > attack on our domains. We found different IP's attempting to wget our content > non stop and we are seeing more of this happening today with different IP's > after we blocked the first set. > > -- > Larry E. Masters > > > On Thu, Feb 3, 2011 at 9:13 AM, hill180 wrote: > Before it went dark, I liked it. Faster, easier to search. > > but alas... :) > > On Feb 3, 2011, at 8:11 AM, euromark wrote: > > > and now has a 500 - internal error :) > > > > > > On 3 Feb., 13:11, Graham Weldon wrote: > >> The CakePHP Book[1] has undergone a major facelift and incorporates a > >> whole range of changes to make the book more accessible and usable for > >> all our users. > >> > >> The CakePHP Book[1] has held its previous design and interface since > >> launch back in January 2008. Having lasted the test of time, we've > >> lovingly set aside the old design for a new style kindly contributed > >> by Emerson Lackey[2] and skillfully crafted and adapted by our own > >> jose_zap. > >> > >> The new book design incorporates a local caching mechanism that means > >> faster response times for clients looking for information within the > >> book, by loading information from the cache if its already available, > >> and a lessened load on the CakePHP servers, which can take a fair old > >> beating at the best of times. > >> > >> The enhancements also ease the accessibility for the various language > >> translations that are available, enabling content to be more easily > >> accessed and referenced by people speaking other languages. > >> > >> This initial design change is a precursor to a larger documentation > >> overhaul the core team is undertaking to ensure a quality manual is > >> available at all time, and speedy to access when you need it. As > >> mentioned previously[3] by Mark Story, the core team has been > >> investigating the use of Sphinx to generate documentation, and we'll > >> have more updates for you as they become available. > >> > >> If you identify any issues with the new book, or have any suggestions > >> for improvements or adjustments to the new design and interface, > >> please let us know via the lighthouse app issue tracking system for > >> the cookbook[4]. > >> > >> We hope you enjoy the facelift, and happy baking! > >> > >> [1]:http://book.cakephp.org > >> > >> [2]:http://twitter.com/emerson_lackey > >> > >> [3]:http://bakery.cakephp.org/articles/markstory/2011/01/19/cakephp_1_3_7... > >> > >> [4]:http://cakephp.lighthouseapp.com/projects/43067-cookbook > >> > >> Cheers, > >> Graham Weldon > >> Aka: Predominant > > > > -- > > 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: A facelift for the CakePHP Book
Before it went dark, I liked it. Faster, easier to search. but alas... :) On Feb 3, 2011, at 8:11 AM, euromark wrote: > and now has a 500 - internal error :) > > > On 3 Feb., 13:11, Graham Weldon wrote: >> The CakePHP Book[1] has undergone a major facelift and incorporates a >> whole range of changes to make the book more accessible and usable for >> all our users. >> >> The CakePHP Book[1] has held its previous design and interface since >> launch back in January 2008. Having lasted the test of time, we've >> lovingly set aside the old design for a new style kindly contributed >> by Emerson Lackey[2] and skillfully crafted and adapted by our own >> jose_zap. >> >> The new book design incorporates a local caching mechanism that means >> faster response times for clients looking for information within the >> book, by loading information from the cache if its already available, >> and a lessened load on the CakePHP servers, which can take a fair old >> beating at the best of times. >> >> The enhancements also ease the accessibility for the various language >> translations that are available, enabling content to be more easily >> accessed and referenced by people speaking other languages. >> >> This initial design change is a precursor to a larger documentation >> overhaul the core team is undertaking to ensure a quality manual is >> available at all time, and speedy to access when you need it. As >> mentioned previously[3] by Mark Story, the core team has been >> investigating the use of Sphinx to generate documentation, and we'll >> have more updates for you as they become available. >> >> If you identify any issues with the new book, or have any suggestions >> for improvements or adjustments to the new design and interface, >> please let us know via the lighthouse app issue tracking system for >> the cookbook[4]. >> >> We hope you enjoy the facelift, and happy baking! >> >> [1]:http://book.cakephp.org >> >> [2]:http://twitter.com/emerson_lackey >> >> [3]:http://bakery.cakephp.org/articles/markstory/2011/01/19/cakephp_1_3_7... >> >> [4]:http://cakephp.lighthouseapp.com/projects/43067-cookbook >> >> Cheers, >> Graham Weldon >> Aka: Predominant > > -- > 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Views with Joined Models
My apologies for not explaining better: Controller: The view has the following: $this->set('author', $this->Author->read(null, $id)); The View Contains the Following > This is where I want all the tags for this post but I can't figure out how what is the array/variable (IE something like... $post['Tags']['name'] The relationships in the models are setup correctly because the scaffold works without a problem. I just want to display the data in the Authors page. On Jan 31, 2011, at 9:37 PM, Dr. Tarique Sani wrote: > Your Author model needs to be related to Post model - Author hasMany Post and > then > > $this->set('author', $this->Author->read(null, $id)); > > Do a debug on your author array in your view and figure out what is happening > :-) > > Cheers > Tarique > > > > On Tue, Feb 1, 2011 at 3:49 AM, Hill180 wrote: > I am sorry for the basic question.. but here goes. > > I will use Blog Posts as an Example > > I have the following models: > > Author > Post > Tags > > All the associations are fine as the scaffold pages are working > without a problem. > > I have a page under the Author Controller the standard view: > > function view($id = null) { >if (!$id) { >$this->Session->setFlash(__('Invalid Author', true)); >$this->redirect(array('action' => 'index')); >} >$this->set('author', $this->Post->read(null, $id)) >} > > In my view.ctp > > I want to show the author, all his/her posts and individual tags. > > I can easily show all the posts, but how do I get the individual tags? > > IE: > > echo $author->['Author']['name']; //good > > foreach ($author['Post'] as $post): > print_r(post); //good > > How would I get all the tags for that specific post? > > > Goal: > Open http://localhost/authors/view/3 > > AUTHOR: DUDE #3 > Post 5 - Tags (OPEN, IT) > Post 10 - Tags (IT) > Post 11 - Tags (Open) > > Thanks! > > -- > 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+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php > > > > -- > = > Cheesecake-Photoblog: http://cheesecake-photoblog.org > PHP for E-Biz: http://sanisoft.com > = > > -- > 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+unsubscr...@googlegroups.com 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Views with Joined Models
I am sorry for the basic question.. but here goes. I will use Blog Posts as an Example I have the following models: Author Post Tags All the associations are fine as the scaffold pages are working without a problem. I have a page under the Author Controller the standard view: function view($id = null) { if (!$id) { $this->Session->setFlash(__('Invalid Author', true)); $this->redirect(array('action' => 'index')); } $this->set('author', $this->Post->read(null, $id)) } In my view.ctp I want to show the author, all his/her posts and individual tags. I can easily show all the posts, but how do I get the individual tags? IE: echo $author->['Author']['name']; //good foreach ($author['Post'] as $post): print_r(post); //good How would I get all the tags for that specific post? Goal: Open http://localhost/authors/view/3 AUTHOR: DUDE #3 Post 5 - Tags (OPEN, IT) Post 10 - Tags (IT) Post 11 - Tags (Open) Thanks! -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php