Wednesday, March 27, 2013

Re: Tree Help

If all you want are single-cell rows you could simply use
generateTreeList() as described here:

http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::generateTreeList

Then just do:

foreach($data as $d) {
echo '<tr><td>', $['Category']['name'], '</td></tr>';
}

On Wed, Mar 27, 2013 at 4:27 PM, Advantage+ <movepixels@gmail.com> wrote:
> I have followed various guides / tutorials on using the tree behavior but
> creating the view I need seems to be where I am stuck.
>
>
>
> I would like to display it in a table where the parent category then the
> additional child categories under each (basic structure below) for the admin
> section.
>
>
>
> <tr><td>Men</td></tr>
>
> <tr><td> - Shoes</td></tr>
>
> <tr><td> - Jackets</td></tr>
>
> <tr><td> - Pants</td></tr>
>
>
>
> <tr><td>Women</td></tr>
>
> <tr><td> - Shoes</td></tr>
>
> <tr><td> - Jackets</td></tr>
>
> <tr><td> - Pants</td></tr>
>
>
>
> <tr><td>Children</td></tr>
>
> <tr><td> - Shoes</td></tr>
>
> <tr><td> - Jackets</td></tr>
>
> <tr><td> - Pants</td></tr>
>
>
>
> Can anyone point me in the right direction or know of any helpers /
> suggestions?
>
>
>
> Thanks,
>
>
>
> Dave
>
>
>
>
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscribe@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
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 unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: