Hi all,
Tracker seems inexcusably basic right now. I was disappointed to discover I can't theme the output (add a column, change the table headers, etc.) because the tracker_page menu callback function spits mark-up straight out without routing it through a theme function of tpl file. =(
I propose this really ought to be fixed in D7, so you can theme the Tracker page properly. In its most basic, it would simply involve creating a hook_theme and moving this code in tracker_page() (see tracker.pages.inc) to a theme function:
$output = '<div id="tracker">';
$output .= theme('table', $header, $rows);
$output .= theme('pager', NULL, 25, 0);
$output .= '</div>';
Or we could go to the next step and make a preprocess function and a tpl file for it.
Either way, I'm happy to create this patch if the wider community agrees. =)
Comments
Comment #1
tayzlor commentedattaching couple of patch files which need reviewing, tracker now runs through the theme API in the supplied patch.
Comment #3
tayzlor commentedsubmitting patch file 1 of 2.
i know this is incomplete, just checking this patch actually passes first then will submit the next one =)
Comment #4
tayzlor commentedComment #6
greg.harveyLet's try that again... *sigh*
Comment #7
tayzlor commentedand the 2nd one.... fingers crossed...
Comment #8
tayzlor commentedComment #10
swentel commented@tazylor
it's quite normal that second patch fails, it fires a query on the comments table, while it's now 'comment'. (I'm not sure, but it's possible it might also fail on the theme function since when only this patch is applied, drupal does not know of the tracker_theme hook)
Merge those two patches in one file, should give you more succes :)
Comment #11
tayzlor commentedthis is fun... :)
Comment #12
tayzlor commentedComment #14
catchPatch still has {comments} in it - try cvs update before rolling the patch.
Comment #15
tayzlor commentedcheers for the help catch =)
re-rolled patch... aaandd again.. comme on!! :p
Comment #16
tayzlor commentedComment #18
pasqualleTracker output was changed to render array, and the module has views support. Therefore the output can be easily changed now.