summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnAlbin2008-02-08 23:42:11 (GMT)
committer JohnAlbin2008-02-08 23:42:11 (GMT)
commit2f573a33e1eec8c222b993f96402eae3a98637b3 (patch)
treedac14c3dfb0680bf8479688056776c73530af659
parentbdbabbe3a6a14b35a848996a2a734db0539718b7 (diff)
#219401: Add theme override examples for all functions used in Zen core
-rw-r--r--CHANGELOG.txt3
-rw-r--r--SUBTHEME/template.php61
2 files changed, 64 insertions, 0 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 218accd..57675e9 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,6 @@
+Zen 5.x-1.0-rc1
+ #219401: Add theme override examples for all functions used in Zen core
+
Zen 5.x-1.0-beta2
#214777: sub-theme's search-theme-form.tpl is ignored
#206707: tr.even/odd border-bottom is missing in IE
diff --git a/SUBTHEME/template.php b/SUBTHEME/template.php
index a8eb3f4..497ec3b 100644
--- a/SUBTHEME/template.php
+++ b/SUBTHEME/template.php
@@ -82,6 +82,21 @@ function SUBTHEME_regions() {
/**
+ * Return a themed breadcrumb trail.
+ *
+ * @param $breadcrumb
+ * An array containing the breadcrumb links.
+ * @return
+ * A string containing the breadcrumb output.
+ */
+/* -- Delete this line if you want to use this function
+function zen_breadcrumb($breadcrumb) {
+ return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .' ›</div>';
+}
+// */
+
+
+/**
* Override or insert PHPTemplate variables into the page templates.
*
* @param $vars
@@ -138,3 +153,49 @@ function phptemplate_search_theme_form($form) {
return _phptemplate_callback('search_theme_form', array('form' => $form), array('search-theme-form'));
}
// */
+
+/**
+ * Generate the HTML representing a given menu item ID.
+ *
+ * An implementation of theme_menu_item_link()
+ *
+ * @param $item
+ * array The menu item to render.
+ * @param $link_item
+ * array The menu item which should be used to find the correct path.
+ * @return
+ * string The rendered menu item.
+ */
+/* -- Delete this line if you want to use this function
+function zen_menu_item_link($item, $link_item) {
+ // If an item is a LOCAL TASK, render it as a tab
+ $tab = ($item['type'] & MENU_IS_LOCAL_TASK) ? TRUE : FALSE;
+ return l(
+ $tab ? '<span class="tab">'. check_plain($item['title']) .'</span>' : $item['title'],
+ $link_item['path'],
+ !empty($item['description']) ? array('title' => $item['description']) : array(),
+ !empty($item['query']) ? $item['query'] : NULL,
+ !empty($link_item['fragment']) ? $link_item['fragment'] : NULL,
+ FALSE,
+ $tab
+ );
+}
+// */
+
+/**
+ * Duplicate of theme_menu_local_tasks() but adds clear-block to tabs.
+ */
+/* -- Delete this line if you want to use this function
+function zen_menu_local_tasks() {
+ $output = '';
+
+ if ($primary = menu_primary_local_tasks()) {
+ $output .= '<ul class="tabs primary clear-block">'. $primary .'</ul>';
+ }
+ if ($secondary = menu_secondary_local_tasks()) {
+ $output .= '<ul class="tabs secondary clear-block">'. $secondary .'</ul>';
+ }
+
+ return $output;
+}
+// */