3

I'm a HUGE fan of Craft, but I'm wondering how specifically it's able to reuse fields in different sections. I'm very accustomed to an ExpressionEngine environment, where each field's shortname has to be unique. How did P&T build Craft so this is possible?

6

In Craft, all fields are stored in the craft_content table. They are otherwise independent of any field groups, layouts, sections, or anything else.

PRO: This means that any element (Entry, Category, Asset, etc) can access any field.

CON: This means that every element carries the weight of every field. Though if those fields are all empty, the performance impact is almost non-existent.

There's historically been some minor debates over whether or not this tradeoff is worth it... But I think it's safe to say that the benefits vastly outweigh any negligible performance issues. The simple fact is, having all fields in the same table is rarely (never?) the true bottleneck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.