Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / page_build.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/page_build.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/page_build.twig
new file mode 100644 (file)
index 0000000..3f66088
--- /dev/null
@@ -0,0 +1,13 @@
+/**
+ * Implements hook_page_build().
+ */
+function {{ machine_name }}_page_build(&$page) {
+  if (menu_get_object('node', 1)) {
+    // We are on a node detail page. Append a standard disclaimer to the
+    // content region.
+    $page['content']['disclaimer'] = array(
+      '#markup' => t('Acme, Inc. is not responsible for the contents of this sample code.'),
+      '#weight' => 25,
+    );
+  }
+}