Hello,
Hopefully someone can help. I am currently building a module that allows an administrator to promote content to a "lead story". The administrator selects a node he wants to promote and that is it.
I do this through a form in the administrator >> site configuration menu. I also want to display a list of the most recent 10 nodes posted. I have done this but the issue I have is with applying a theme to these nodes.
I have a function called leadstory_admin() that does this -- the code is abridged:
function leadstory_admin() {
$result = db_query(db_rewrite_sql($query), $type, $status, 0, $max_display);
while ($data = db_fetch_object($result)){
$form['title'][$data->nid] = array('#value' => l($data->title, 'node/'. $data->nid));
$form['node'][$data->nid] = array('#value' => $data->nid);
}
}
$form['#theme'] = 'leadstory_admin';
return $form;
I then have a theme_leadstory_admin($form) function. The issue is that the theme function isn't called.
Any ideas how I can get this function to theme work?
I then went to the node module, in particular node.admin.inc and tried messing around with node_admin_nodes() form and theme. Interestingly if I changed the call of:
$form['#theme'] = 'node_admin_nodes';
to
$form['#theme'] = 'node_admin_nodesthemetest';