From: Jason Skomorowski Date: Tue, 25 Jan 2011 20:47:02 +0000 (+0100) Subject: PHP theming for facets. X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=ec846dfd0e4b732ecc81ee4c1c3b9b5967b42200;p=mkdru-moved-to-drupal.org.git PHP theming for facets. --- diff --git a/mkdru-block-facet.tpl.php b/mkdru-block-facet.tpl.php index 61a6c24..c32aed9 100644 --- a/mkdru-block-facet.tpl.php +++ b/mkdru-block-facet.tpl.php @@ -1 +1 @@ -
+
diff --git a/mkdru.module b/mkdru.module index 13ef18a..5a6eb81 100644 --- a/mkdru.module +++ b/mkdru.module @@ -245,12 +245,12 @@ function mkdru_theme() { ), 'mkdru_block_search' => array( 'template' => 'mkdru-block-search', - 'arguments' => array('nid' => null, 'path' => NULL), + 'arguments' => array('nid' => NULL, 'path' => NULL), ), -// 'mkdru_block_facet' => array( -// 'template' => 'mkdru-block-facet', -// 'arguments' => array('divId' => NULL), -// ), + 'mkdru_block_facet' => array( + 'template' => 'mkdru-block-facet', + 'arguments' => array('class' => NULL) + ) ); } @@ -312,30 +312,17 @@ function mkdru_block($op='list', $delta='sources', $edit=array()) { case 'view': switch ($delta) { - // TODO: make the facet themable, I have no clue why this won't work -// case 'mkdru_sources': -// $block['subject'] = t('Source'); -// $block['content'] = theme('mkdru_block_facet', 'mkdru-sources'); -// return $block; -// case 'mkdru_subjects': -// $block['subject'] = t('Subject'); -// $block['content'] = theme('mkdru_block_facet', 'mkdru-subjects'); -// return $block; -// case 'mkdru_authors': -// $block['subject'] = t('Author'); -// $block['content'] = theme('mkdru_block_facet', 'mkdru-authors'); -// return $block; case 'mkdru_sources': $block['subject'] = t('Source'); - $block['content'] = '
'; + $block['content'] = theme('mkdru_block_facet', 'mkdru-facet-sources'); return $block; case 'mkdru_subjects': $block['subject'] = t('Subject'); - $block['content'] = '
'; + $block['content'] = theme('mkdru_block_facet', 'mkdru-facet-subjects'); return $block; case 'mkdru_authors': $block['subject'] = t('Author'); - $block['content'] = '
'; + $block['content'] = theme('mkdru_block_facet', 'mkdru-facet-authors'); return $block; } if (substr($delta, 0, 13) == 'mkdru_search_') {