Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Is the location field a new field you want to add to your custom nodes?</p> <p>You are going to have to handle a couple of hooks. <a href="http://api.drupal.org/api/function/hook_insert/5" rel="nofollow noreferrer">insert</a>, <a href="http://api.drupal.org/api/function/hook_update/5" rel="nofollow noreferrer">update</a>, <a href="http://api.drupal.org/api/function/hook_delete/5" rel="nofollow noreferrer">delete</a>, <a href="http://api.drupal.org/api/function/hook_load/5" rel="nofollow noreferrer">load</a>, <a href="http://api.drupal.org/api/function/hook_form/5" rel="nofollow noreferrer">form</a>, <a href="http://api.drupal.org/api/function/hook_view/5" rel="nofollow noreferrer">view</a>.</p> <p>So you need to add the field to your table. Display the field in the form. Save it when inserting a new node. Update the node when editing the node. Load the field back into the node. Delete the row when the node is deleted. And display the field when node is viewed (teaser or full). <a href="http://api.drupal.org/api/file/developer/hooks/node.php/5" rel="nofollow noreferrer">node reference</a>.</p> <p>At the bottom of every one of those hook pages is an example using {mytable} and a field called 'extra'.</p> <p>[edit] <em>additional information.</em></p> <p>The <a href="http://drupal.org/project/location" rel="nofollow noreferrer">location module</a> adds the fields $node->location and $node->locations. So I think to answer your question. Yes. You can modify them through the $node object.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload