Skip to content

Cake 3.0 bake index template limits to first 7 fields #65

@djamesfar

Description

@djamesfar

It took me hours to figure out why the eighth field of my users table wasn't showing up in index views.
Template/index.ctp creates a Collection of fields, but chains on ->take(7) at the end to limit the list, presumably so index tables don't get too wide for screens. Wouldn't it be better to show them all and offer an optional limit value, or better yet specify a list of fields to show/omit? In 2.x you just went into the baked view and deleted any <th>'s and <td>'s you didn't want. Now you have to pop the hood on the form template and discover and remove the hard-coded (7). Good luck to newbies!
Either way, arbitrarily, and secretly, lopping off everything after the first 7 fields is not the friendliest Bake feature.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions