Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Drupal 6 Module Development
  • Table Of Contents Toc
Learning Drupal 6 Module Development

Learning Drupal 6 Module Development

4.3 (16)
close
close
Learning Drupal 6 Module Development

Learning Drupal 6 Module Development

4.3 (16)

Overview of this book

Table of Contents (14 chapters)
close
close
Learning Drupal 6 Module Development
Credits
About the Author
About the Reviewers
Preface

Hooks for Getting Data


We're getting close to the end, now. We have only three more functions to go.

So far, we've created an installer, implemented hooks to create the database tables, implemented access controls, created a form, and developed functions for maintaining our custom tables.

In this section, we will look at functions used for accessing our content. And once again, we will be moving back toward the familiar. We will start by implementing hook_load(), then we will take a look at hook_view() and hook_theme().

Note

In the subsection Getting the Node's Content in Chapter 4, we used the function node_load() to load the contents of a node. That function is an implementation of hook_node(). In that chapter we also looked carefully at adding theme support to a module, covering hook_theme() as well.

Loading a Node with hook_load()

The hook_load() hook provides a chance for extended content types, like the one we are creating, to load additional data. This extra information is combined with...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Drupal 6 Module Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon