Archive for August, 2010

Drupal 7 Entities

August 29, 2010 1 comment

While looking at some of the differences between nodes and entities, I came across this interesting article explaining what entities are and when should one use them. It served as a good corollary to the existing documentation available on about entities.

One of the major advantages custom entities have over a node, is that, if there is a field inherently associated with that custom entity, and one would like to load that field data in just one query (may be performance reasons), it makes sense to store the field data along with the entity in the same row instead of having to query 2 tables, 1 for the entity and the 2nd for the field data


Drupal 7 Gotchas- Title not visible in “Add form” page AND Custom Node Not Visible in the “Content Types Edit Structure” page.

August 25, 2010 3 comments

So I had implemented hook_node_info wherein I had specified the “has_title” as TRUE, but inspite of that I could not see the Title Field in the “add node” form and also I could not see my custom content type listed in the content types “edit structure” page. This being despite the fact that I had also implemented hook_node_form

After much ado I realized that I had specified a “base” in hook_node_info which was different from my module name. But I had implemented hook_node_form using my module name and NOT the base name.

Therein lied my fault.

Categories: drupal, drupal 7, field api, form api Tags: