Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4055188
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:40:12+00:00 2026-05-20T14:40:12+00:00

So when creating a Drupal site (for example) it’s a very common development helper

  • 0

So when creating a Drupal site (for example) it’s a very common development helper to print the variables of a form etc. at the top of the page, e.g. using dpm() (assuming the devel module is installed).

I’m having trouble grokking all the ways to do this, and the contexts in which they can be used.

For example, I can use dpm($form) within an implementation of hook_form_alter in my custom module. No problem, the variables are printed nicely at the top of the page.

Now, if I look at a template, say, node.tpl.php I see that there are a load of available variables used to construct the page. So if I pick one, e.g. $links, I would’ve thought that adding <?php dpm($links); ?> to node.tpl.php would print the variables out for me. But no!

Why is this, what am I doing wrong? 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T14:40:12+00:00Added an answer on May 20, 2026 at 2:40 pm

    dpm() uses drupal_set_message(). At some point in the page rendering process Drupal prints all messages that have been set with this function.
    You’re using dpm() after that point thus it’s too late to add messages to this very page. However you should see them on the next page or after refreshing the current. Not helpful for debugging though.

    You may want to give the Theme Developer Module a try.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a Drupal site for a client, and I'd like to make administrating
I'm interested in creating a custom theme for a Drupal site I'm working on.
I'm in the middle of creating a Drupal site. It already has lots of
I have a Drupal 6 site with a simple theme I'm creating called NPT.
I am creating a gallery/albums site in Drupal 6. Perhaps the description will be
I'm creating a site using drupal where I'd like to prompt my new users
I have a drupal site that I am creating right now. I have 3
I am creating a custom form in Drupal. In this form I wish to
I'm creating a form using the Content Construction Kit (CCK) in Drupal5. I've added
Creating a patch is very easy in SubVersion, With Tortoise, you right-click and select

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.