Re: $html-tableCells
I don't think so On 14 abr, 18:00, Ed Propsner crotchf...@gmail.com wrote: In all honesty it's easier to write out the html tags ... I was just playing around it. Am I reading it wrong or does the book give you the impression that it can be done?http://book.cakephp.org/view/1435/Inserting-Well-Formatted-elements On Wed, Apr 14, 2010 at 4:13 PM, Lucca Mordente luccamorde...@gmail.comwrote: Hi Ed, Probably you can achieve what you want using css. It seems that isn't possible to add attributes using this html helper method. Lucca Mordente On 14 abr, 16:57, Ed Propsner crotchf...@gmail.com wrote: Looking at the section in the book for $html-tableCells it says ... Wrap a single table cell within an array() for specific td-attributes. $html-tableCells(array('foo', 'bar')); will ouput tr tdfoo/td tdbar/td /tr I'm having a few issues with this one. Could someone give me a quick example of how to output the same code utilizing a td attrib. ? Ie. tr td valign=topfoo/td tdbar/td /tr Thanks, - Ed Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.c omFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe, reply using remove me as the subject. 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 cake-php@googlegroups.com 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?hl=en
Re: $html-tableCells
You don't think I'm misunderstanding what the book says or you don't think the book gives you impression it can be done? On Thu, Apr 15, 2010 at 5:12 AM, Lucca Mordente luccamorde...@gmail.comwrote: I don't think so On 14 abr, 18:00, Ed Propsner crotchf...@gmail.com wrote: In all honesty it's easier to write out the html tags ... I was just playing around it. Am I reading it wrong or does the book give you the impression that it can be done? http://book.cakephp.org/view/1435/Inserting-Well-Formatted-elements On Wed, Apr 14, 2010 at 4:13 PM, Lucca Mordente luccamorde...@gmail.com wrote: Hi Ed, Probably you can achieve what you want using css. It seems that isn't possible to add attributes using this html helper method. Lucca Mordente On 14 abr, 16:57, Ed Propsner crotchf...@gmail.com wrote: Looking at the section in the book for $html-tableCells it says ... Wrap a single table cell within an array() for specific td-attributes. $html-tableCells(array('foo', 'bar')); will ouput tr tdfoo/td tdbar/td /tr I'm having a few issues with this one. Could someone give me a quick example of how to output the same code utilizing a td attrib. ? Ie. tr td valign=topfoo/td tdbar/td /tr Thanks, - Ed Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.c omFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe, reply using remove me as the subject. 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en 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 cake-php@googlegroups.com 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?hl=en
Re: $html-tableCells
Hi Ed, This is the example in the book that shows how to do it: echo $html-tableCells(array( array('Jul 7th, 2007', array('Best Brownies', array('class'='highlight')) , 'Yes'), array('Jun 21st, 2007', 'Smart Cookies', 'Yes'), array('Aug 1st, 2006', 'Anti-Java Cake', array('No', array('id'='special'))), )); So your requirements would be echo $html-tableCells(array( array(array('Foo', array('class'='highlight')), 'Bar') )); Change each cell's string into an array including another array for the cell's options. HTH Paul 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 cake-php@googlegroups.com 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?hl=en To unsubscribe, reply using remove me as the subject.
Re: $html-tableCells
I always use tableCells when I output a table. The way I think of it is: 1. Outer array contains all the rows 2. Each secondary array contains each row 3. Each element contains each cell 4. The element can be an array that contains options for the cell $html-tableCells( array( array( 'Plain text', array('Cell text', array(--options--)), array('Cell text', array(--options--)) ), array( array('Cell text', array(--options--)), 'Plain text', array('Cell text', array(--options--)) ), array( array('Cell text', array(--options--)), array('Cell text', array(--options--)), 'Plain text' ), ) ); So adapting the example in the book you get: table ?php echo $html-tableCells( array( array( 'Jul 7th, 2007', array('Best Brownies', array('class'='highlight')), 'Yes' ), array( 'Jun 21st, 2007', array('Smart Cookies', array('valign' = 'top')), 'Yes' ), array( 'Aug 1st, 2006', 'Anti-Java Cake', array('No', array('id'='special')) ), ) ); ? /table When I put this in a view I get valign top for the Smart Cookie Cell. Jeremy Burns jeremybu...@me.com On 15 Apr 2010, at 10:12, Lucca Mordente wrote: I don't think so On 14 abr, 18:00, Ed Propsner crotchf...@gmail.com wrote: In all honesty it's easier to write out the html tags ... I was just playing around it. Am I reading it wrong or does the book give you the impression that it can be done?http://book.cakephp.org/view/1435/Inserting-Well-Formatted-elements On Wed, Apr 14, 2010 at 4:13 PM, Lucca Mordente luccamorde...@gmail.comwrote: Hi Ed, Probably you can achieve what you want using css. It seems that isn't possible to add attributes using this html helper method. Lucca Mordente On 14 abr, 16:57, Ed Propsner crotchf...@gmail.com wrote: Looking at the section in the book for $html-tableCells it says ... Wrap a single table cell within an array() for specific td-attributes. $html-tableCells(array('foo', 'bar')); will ouput tr tdfoo/td tdbar/td /tr I'm having a few issues with this one. Could someone give me a quick example of how to output the same code utilizing a td attrib. ? Ie. tr td valign=topfoo/td tdbar/td /tr Thanks, - Ed Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.c omFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe, reply using remove me as the subject. 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 cake-php@googlegroups.com 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?hl=en 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 cake-php@googlegroups.com 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?hl=en
Re: $html-tableCells
I just tried the example Paul gave and got it working right. The problem was I just making a mess out of the arrays and getting lost in them ... there's a good handful there. I was also going about it a bit differently and my code wasn't quite as structured as yours I think there is a lesson the be learned there. Thanks On Thu, Apr 15, 2010 at 5:36 AM, Jeremy Burns jeremybu...@me.com wrote: I always use tableCells when I output a table. The way I think of it is: 1. Outer array contains all the rows 2. Each secondary array contains each row 3. Each element contains each cell 4. The element can be an array that contains options for the cell $html-tableCells( array( array( 'Plain text', array('Cell text', array(--options--)), array('Cell text', array(--options--)) ), array( array('Cell text', array(--options--)), 'Plain text', array('Cell text', array(--options--)) ), array( array('Cell text', array(--options--)), array('Cell text', array(--options--)), 'Plain text' ), ) ); So adapting the example in the book you get: table ?php echo $html-tableCells( array( array( 'Jul 7th, 2007', array('Best Brownies', array('class'='highlight')), 'Yes' ), array( 'Jun 21st, 2007', array('Smart Cookies', array('valign' = 'top')), 'Yes' ), array( 'Aug 1st, 2006', 'Anti-Java Cake', array('No', array('id'='special')) ), ) ); ? /table When I put this in a view I get valign top for the Smart Cookie Cell. Jeremy Burns jeremybu...@me.com On 15 Apr 2010, at 10:12, Lucca Mordente wrote: I don't think so On 14 abr, 18:00, Ed Propsner crotchf...@gmail.com wrote: In all honesty it's easier to write out the html tags ... I was just playing around it. Am I reading it wrong or does the book give you the impression that it can be done? http://book.cakephp.org/view/1435/Inserting-Well-Formatted-elements On Wed, Apr 14, 2010 at 4:13 PM, Lucca Mordente luccamorde...@gmail.comwrote: Hi Ed, Probably you can achieve what you want using css. It seems that isn't possible to add attributes using this html helper method. Lucca Mordente On 14 abr, 16:57, Ed Propsner crotchf...@gmail.com wrote: Looking at the section in the book for $html-tableCells it says ... Wrap a single table cell within an array() for specific td-attributes. $html-tableCells(array('foo', 'bar')); will ouput tr tdfoo/td tdbar/td /tr I'm having a few issues with this one. Could someone give me a quick example of how to output the same code utilizing a td attrib. ? Ie. tr td valign=topfoo/td tdbar/td /tr Thanks, - Ed Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.c omFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe, reply using remove me as the subject. 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message
Re: $html-tableCells
I think there is a lesson the be learned there. Indeed. Use CSS :-) 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 cake-php@googlegroups.com 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?hl=en To unsubscribe, reply using remove me as the subject.
Re: $html-tableCells
Hi Ed, Probably you can achieve what you want using css. It seems that isn't possible to add attributes using this html helper method. Lucca Mordente On 14 abr, 16:57, Ed Propsner crotchf...@gmail.com wrote: Looking at the section in the book for $html-tableCells it says ... Wrap a single table cell within an array() for specific td-attributes. $html-tableCells(array('foo', 'bar')); will ouput tr tdfoo/td tdbar/td /tr I'm having a few issues with this one. Could someone give me a quick example of how to output the same code utilizing a td attrib. ? Ie. tr td valign=topfoo/td tdbar/td /tr Thanks, - Ed 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 cake-php@googlegroups.com 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?hl=en To unsubscribe, reply using remove me as the subject.
Re: $html-tableCells
In all honesty it's easier to write out the html tags ... I was just playing around it. Am I reading it wrong or does the book give you the impression that it can be done? http://book.cakephp.org/view/1435/Inserting-Well-Formatted-elements On Wed, Apr 14, 2010 at 4:13 PM, Lucca Mordente luccamorde...@gmail.comwrote: Hi Ed, Probably you can achieve what you want using css. It seems that isn't possible to add attributes using this html helper method. Lucca Mordente On 14 abr, 16:57, Ed Propsner crotchf...@gmail.com wrote: Looking at the section in the book for $html-tableCells it says ... Wrap a single table cell within an array() for specific td-attributes. $html-tableCells(array('foo', 'bar')); will ouput tr tdfoo/td tdbar/td /tr I'm having a few issues with this one. Could someone give me a quick example of how to output the same code utilizing a td attrib. ? Ie. tr td valign=topfoo/td tdbar/td /tr Thanks, - Ed 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe, reply using remove me as the subject. 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 cake-php@googlegroups.com 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?hl=en
Re: $html-tableCells and colspan
Hi! echo $html-tableCells(array(array( array(some text., colspan='6') ) ) ); 2009/2/24 Mify mif...@gmail.com Hi! I would like to use colspan but i dont know how to do it, is it even possible to do ? I'm a beginner with cake so please help me if you can :) I have tried $tr1= array( array( $article['Blog']['title'] ,array ('colspan'='2') ), array($article['Blog']['introtext'],$article['Blog'] ['created'] ) ); echo $html-tableCells($tr1); But that dont work Hope someone can help me with this Regards // Mify --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---