Reputation: 2799
The print $content statement in page.tpl.php . I want to alter it but I can't figure out what/where is the source of the $content variable in page.tpl.php file.
I'd appreciate any help. Thanks.
the drupal version is 6,
Upvotes: 1
Views: 1970
Reputation: 309
The ConTemplate module might provide the sort of control over $content that you are looking for. http://drupal.org/project/contemplate
Upvotes: 0
Reputation: 210
chx's answer is correct. This is just a longer explanation.
$content depends on the URL or more precisely the region that calls the variable. The URL could be something like node/10, taxonomy/term/1, etc. Each of these paths is associated with menu entry which has a callback function that generates the value of $content.
Take a look at the API docs for more info. http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_get_content/6
Upvotes: 0
Reputation: 11760
This is the return value of menu_execute_active_handler()
. You can't change it in Drupal 6. You need Drupal 7 hook_page_alter()
for that. Now, preprocess helps a little, see http://api.drupal.org/api/drupal/includes--theme.inc/function/theme/6
Upvotes: 2