dprint_r() example
Below is an example of the output from calling the Devel module's dprint_r() function within a node.tpl.php.
// This is the code that generated the below dprint_r() output. dprint_r($variables);
Compare this output to my experimental dprint_rx() function.
Array
(
[page] => Array
(
[#show_messages] =>
[header] => Array
(
)
[help] => Array
(
)
[page_top] => Array
(
)
[page_bottom] => Array
(
)
[highlighted] => Array
(
)
[featured] => Array
(
)
[content] => Array
(
)
[sidebar_first] => Array
(
)
[sidebar_second] => Array
(
)
[triptych_first] => Array
(
)
[triptych_middle] => Array
(
)
[triptych_last] => Array
(
)
[footer_firstcolumn] => Array
(
)
[footer_secondcolumn] => Array
(
)
[footer_thirdcolumn] => Array
(
)
[footer_fourthcolumn] => Array
(
)
[footer] => Array
(
)
[dashboard_main] => Array
(
)
[dashboard_sidebar] => Array
(
)
[dashboard_inactive] => Array
(
)
)
[show_messages] =>
[layout] => none
[base_path] => /
[front_page] => /
[feed_icons] =>
[language] => stdClass Object
(
[language] => en
[name] => English
[native] => English
[direction] => 0
[enabled] => 1
[plurals] => 0
[formula] =>
[domain] =>
[prefix] =>
[weight] => 0
[javascript] =>
[dir] => ltr
)
[logo] =>
[main_menu] => Array
(
[menu-216] => Array
(
[attributes] => Array
(
[title] =>
)
[href] => <front>
[title] => Home
)
[menu-211] => Array
(
[attributes] => Array
(
[title] => About
)
[href] => node/1
[title] => About
)
[menu-212] => Array
(
[attributes] => Array
(
[title] => Experience
)
[href] => node/2
[title] => Experience
)
[menu-215] => Array
(
[attributes] => Array
(
[title] => Jacob S. Rockowitz
)
[href] => node/5
[title] => Resume
)
[menu-875] => Array
(
[href] => work
[title] => Work
)
[menu-841] => Array
(
[attributes] => Array
(
[title] =>
)
[href] => blog
[title] => Blog
)
[menu-842] => Array
(
[attributes] => Array
(
[title] =>
)
[href] => contact
[title] => Contact
)
)
[secondary_menu] => Array
(
)
[action_links] => Array
(
)
[site_name] => The Big Blue House: Jake Rockowitz
[site_slogan] =>
[tabs] => Array
(
[#theme] => menu_local_tasks
[#primary] =>
[#secondary] =>
)
[node] => stdClass Object
(
[vid] => 133
[uid] => 3
[title] => dprint_r() example
[log] =>
[status] => 1
[comment] => 0
[promote] => 0
[sticky] => 0
[nid] => 22
[type] => page
[language] => und
[created] => 1234298157
[changed] => 1324986460
[tnid] => 0
[translate] => 0
[revision_timestamp] => 1324986460
[revision_uid] => 1
[body] => Array
(
[und] => Array
(
[0] => Array
(
[value] => <p>Below is an example of the output from calling the Devel module's dprint_r() function within a node.tpl.php.</p>
<pre>
// This is the code that generated the below dprint_r() output.
dprint_r($variables);</pre>
<p><a href="dprintrx-example">Compare this output to my experimental dprint_rx() function.</a></p>
<pre><?php
$variables = array('page' => array('#show_messages' => NULL));
template_preprocess_page($variables);
print check_plain(print_r($variables, TRUE));
?></pre>
[summary] =>
[format] => php_code
)
)
)
[name] => Jake
[picture] => 0
[data] => a:3:{s:13:"form_build_id";s:37:"form-d4930573c61481c1fec6594b1545312c";s:7:"contact";i:1;s:9:"nodewords";a:2:{s:8:"keywords";s:0:"";s:11:"description";s:0:"";}}
[_field_view_prepared] => 1
[entity_view_prepared] => 1
[content] => Array
(
)
)
[theme_hook_suggestions] => Array
(
[0] => page__node
[1] => page__node__%
[2] => page__node__22
)
)