Patch to allow themeing of taxonomy_term_page()

VivoDan - October 31, 2007 - 22:26
Project:Taxonomy Theme
Version:4.7.x-1.x-dev
Component:Code / API
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Previously, it wasn't possible to theme taxonomy_term_page() if you needed to display your results in a different format. The below patch adds a wrapper function that calls theme() to allow for this ability.

--- modules/taxonomy.module.orig    2007-10-31 14:43:17.000000000 -0700
+++ modules/taxonomy.module      2007-10-31 14:49:37.000000000 -0700
@@ -1192,6 +1192,10 @@
  * Menu callback; displays all nodes associated with a term.
  */
function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
+       return theme('taxonomy_term_page', $str_tids, $depth, $op);
+}
+
+function theme_taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
   if (preg_match('/^([0-9]+[+ ])+[0-9]+$/', $str_tids)) {
     $operator = 'or';
     // The '+' character in a query string may be parsed as ' '.

#1

profix898 - January 24, 2009 - 14:52
Component:- Taxonomy» Code / API
Status:needs review» closed

We dont hack core modules!!! And 4.7 is no longer supported.

 
 

Drupal is a registered trademark of Dries Buytaert.