I would like to extend the taxonomy_context module through another module.
Presently, taxonomy_context creates an index page for each term. This index page displays titles and descriptions/teasers of nodes/terms belonging to the present term.
I want to create a feature where a single node can be designated as the 'node index' for a term.
Example
I have a term 'Science Instrument'. There are six story nodes that belong to this term. taxonomy_context will create an index page listing all six nodes:
http://kalawe.com/images/support/drupal/indexBefore.gif
I don't want this. I want taxonomy_context to only display the title and body of the node designated as the 'node index':
http://kalawe.com/images/support/drupal/indexAfter.gif
Code
I've created a new table 'node_index', with a single field 'nid' which is the node id of a node marked as an 'node index'.
It would get the term's id using the taxonomy_context_get_context() function:
$context = taxonomy_context_get_context();
This db query will fetch the proper index node:
SELECT gem_node_index.nid,rev.title,rev.body
FROM term_node,gem_node_index,node,node_revisions as rev
WHERE
term_node.tid=$context->tid
AND
term_node.nid=gem_node_index.nid
AND
gem_node_index.nid=node.nid
AND
node.vid=rev.vid
I don't want to hack the taxonomy_context module. How do I go about creating a new module to modify the term index pages taxonomy_context creates?