Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
Hello, I'm almost finished with node_example.module, I've learned a lot from it and I'm almost ready to start creating my own node types.
If I have understood correctly I use the node table to maintain common fields and create a new table, node_example, which will contain the additional fields of my new node type, this new table should include a nid field to be able to join to the main node table, am I correct?
I have two observations:
1. I modified node_example_validate() to use form_set_error()
I want to be able to recover all the nodes attached to a tid. I'm thinking of a function which might be called "taxonomy_get_nodes" for example, but cannot find it anywhere. I have found a "taxonomy_select_nodes", but this only returns a limited amount of information (I really want the nid and the title).
Similarly, a function which would simply return all the properties of a node would be very nice: eg "node_get_attributes"
I have spent ages looking through the documentation but with no success...
I'm writing a module to manage a large amount of encyclopedia data... and I reached the point where I was trying to set the image setup. I couldn't figure it out for the life of me. I set a form_file() in the node_form() hook... but for some reason i'm not fully getting it i think. can someone lead me in the right direction? i think my problem exists in my _insert() and _replace() hooks, but i'm not sure.
I would like to define a block with content depending on the taxonomy of the current node (basically I have defined a taxonomy of travel places used in my blog and want to add a block to the sidebar with a map of that country). I think that I can figure out how to display the block (using a .module file) etc, but I'm having difficulty in finding out what the taxonomy of the current node is. This almost seems an FAQ, but I cannot quite find the answer I'm looking for in the forums.
I'm using HTML tables as part of the Drupal form, but obviously the lines aren't the same style as the rest of the Drupal Theme.
This might be a RTFM situation, but is there a way to get the table to use the Drupal theme line style? Or should I fall back to using HTML div blocks and adding those to the Drupal theme?