node_load_from_title() is a function for Drupal 7 to replace functionality lost in the changeover from Drupal 6.
Drupal 6 had a lot of functions with optional selection criteria. You could specify the id of the node or item you want or you could provide something else including the title. Drupal 7 replaces the selectivity of the
node_load() function with a more complicated selection process.
node_load_from_title() gives you a common requirement, the selection of a not by title, as a function.
api.drupal.org/api/drupal/modules--node--node.module/function/node_load/7#comment-19239 is a typical comment about the change.
- Down file node_load_from_title.zip.
- Expand the file and check all nine lines of the code to make sure I am not trying to destroy your computer.
- Copy the
- Switch on module
- Start using
node_load_from_title()in your modules.
- Remember to add
dependencies = node_load_from_titleto the
.infofile in your module.
You are free to use this module in any way you like under Drupal so long as you do not charge for the code. Use the GPL 2 licence as supplied with Drupal 7. If Ubuntu Linux had a decent Git user interface application, I would load this code into drupal.org. If Git had any decent user interfaces, including on Windows, I would load this code into Drupal.org.