I'd need to keep a table with different fields that I'd like to show from somewhere in my site. This information can be updated on regular basis.

Does anyone know if something like this is already implemented on drupal or any of the contributed modules?

Thankx

Comments

killes@www.drop.org’s picture

But it should not be terribly hard to write something like this.

bali’s picture

I'm not sure I understand your requirement correctly, but I've built a page that will display a table which will collect nodes in table cells based on taxonomy terms assigned to the nodes.
To make this work:
- Create two taxonomies matching table rows en columns.
- Assign one (or more) column and row terms to your nodes.
- Paste the code below in a page; adjust the term ids to your ids.

Note: in the example code Row 1 has 'fixed links' to nodes; subsequent rows are taxonomy-based.

function getnodes($id1, $id2) {
$tax = array ("str_tids" => "$id1, $id2", "tids" => array ($id1, $id2), "operator" => "and");

$result = taxonomy_select_nodes(array2object($tax), 0);
while ($node = db_fetch_object($result)) {
  $output[] = l($node->title, "node/view/". $node->nid);
}

return (theme_item_list($output));
}

$content = "
<table width=\"100%\" border=\"1\" cellpadding=\"3\" bordercolor=\"#999999\">
  <tr bgcolor=\"#CCCCCC\">
    <td width=\"10%\" align=\"right\" bgcolor=\"#CCCCCC\">Row 1</td>
    <td width=\"18%\" align=\"center\"><a href=\"node/view/29\">Col 2</a></td>
    <td width=\"18%\" align=\"center\"><a href=\"node/view/30\">Col 3</a></td>
    <td width=\"18%\" align=\"center\"><a href=\"node/view/31\">Col 4</a></td>
    <td width=\"18%\" align=\"center\"><a href=\"node/view/32\">Col 5</a></td>
    <td width=\"18%\" align=\"center\"><a href=\"node/view/33\">Col 6</a></td>
  </tr>";
$content .="<tr>
    <td align=\"right\" bgcolor=\"#CCCCCC\">Market</td>
    <td>". getnodes (17,10) ."</td>
    <td>". getnodes (17,11) ."</td>
    <td>". getnodes (17,12) ."</td>
    <td>". getnodes (17,13) ."</td>
    <td>". getnodes (17,14) ."</td>
  </tr>";
$content .="<tr>
    <td bgcolor=\"#CCCCCC\"><strong>Row 2</strong></td>
    <td>". getnodes (18,10) ."</td>
    <td>". getnodes (18,11) ."</td>
    <td>". getnodes (18,12) ."</td>
    <td>". getnodes (18,13) ."</td>
    <td>". getnodes (18,14) ."</td>
  </tr>";
$content .="<tr>
    <td bgcolor=\"#CCCCCC\"><strong>Row 3</strong></td>
    <td>". getnodes (19,10) ."</td>
    <td>". getnodes (19,11) ."</td>
    <td>". getnodes (19,12) ."</td>
    <td>". getnodes (19,13) ."</td>
    <td>". getnodes (19,14) ."</td>
  </tr>";
</table>
";

print $content;