summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/page.module33
-rw-r--r--modules/page/page.module33
2 files changed, 38 insertions, 28 deletions
diff --git a/modules/page.module b/modules/page.module
index 34d4d063c..efe2820e7 100644
--- a/modules/page.module
+++ b/modules/page.module
@@ -105,20 +105,25 @@ function page_body($node) {
function page_view($node, $main = 0) {
global $theme;
- /*
- ** Extract the page body. If body is dynamic (using PHP code), the body
- ** will be generated.
- */
-
- $output .= page_body($node);
-
- /*
- ** Add the node specific links:
- */
-
- $output .= "<div align=\"right\">". $theme->links(link_node($node, $main)) ."</div>";
-
- $theme->box($node->title, $output);
+ if ($main) {
+ $theme->node($node, $main);
+ }
+ else {
+ /*
+ ** Extract the page body. If body is dynamic (using PHP code), the body
+ ** will be generated.
+ */
+
+ $output .= page_body($node);
+
+ /*
+ ** Add the node specific links:
+ */
+
+ $output .= "<div align=\"right\">". $theme->links(link_node($node, $main)) ."</div>";
+
+ $theme->box($node->title, $output);
+ }
}
function page_form(&$node, &$help, &$error) {
diff --git a/modules/page/page.module b/modules/page/page.module
index 34d4d063c..efe2820e7 100644
--- a/modules/page/page.module
+++ b/modules/page/page.module
@@ -105,20 +105,25 @@ function page_body($node) {
function page_view($node, $main = 0) {
global $theme;
- /*
- ** Extract the page body. If body is dynamic (using PHP code), the body
- ** will be generated.
- */
-
- $output .= page_body($node);
-
- /*
- ** Add the node specific links:
- */
-
- $output .= "<div align=\"right\">". $theme->links(link_node($node, $main)) ."</div>";
-
- $theme->box($node->title, $output);
+ if ($main) {
+ $theme->node($node, $main);
+ }
+ else {
+ /*
+ ** Extract the page body. If body is dynamic (using PHP code), the body
+ ** will be generated.
+ */
+
+ $output .= page_body($node);
+
+ /*
+ ** Add the node specific links:
+ */
+
+ $output .= "<div align=\"right\">". $theme->links(link_node($node, $main)) ."</div>";
+
+ $theme->box($node->title, $output);
+ }
}
function page_form(&$node, &$help, &$error) {