2011-02-28 76 views
1

page.tpl.php中的print $ content語句。我想改變它,但我無法弄清楚page.tpl.php文件中$ content變量的來源在哪裏。drupal page.tpl.php內容變量?

我很感激任何幫助。謝謝。

Drupal的版本是6,

+0

你能澄清一下,如果你問的是改變$ content變量本身,還是你在操縱$ content變量中的各個字段(比如標題,正文等)? – wrburgess 2011-02-28 06:08:11

+0

更改$ content變量本身。感謝您的回覆,感謝您的 – runeveryday 2011-02-28 07:33:10

回答

2

這是menu_execute_active_handler()返回值。你不能在Drupal 6中改變它。你需要Drupal 7 hook_page_alter()。現在,預處理會有所幫助,請參閱http://api.drupal.org/api/drupal/includes--theme.inc/function/theme/6

+0

,但在index.php中,有代碼'require_once'./includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);'然後在bootstrap.inc'我找不到menu_execute_active_handler()定義。爲什麼? $ return = menu_execute_active_handler(); – runeveryday 2011-02-28 05:18:56