[support] 'News'-type feature required
Earnie Boyd
earnie at users.sourceforge.net
Fri Oct 26 12:12:56 UTC 2007
Quoting The Janitor <thejanitor at fastmail.fm>:
> 26 October 2007 - 07:23 (where I live)
> support at drupal.org
>
> Hello support,
>
> I'm developing a site using the Abac theme and would like to publish
> short (say, 3-4 sentences) 'headlines' in the left sidebar. These
> headlines wouldn't relate to any other story/page.
>
> I can't work out how to do this. Is there a module that does this or
> can it be done with the basic installation?
>
Add a content type e.g. Headlines
Add a block e.g. Headlines
For the Block body choose the php input filter
Add something like
<code>
<?php
$res = db_query("SELECT title, nid FROM {node_revisions}");
$output=null;
while ($data = db_fetch_object($res)) {
$output .= l($data->title, 'node/'.$data->nid) . '<br/>';
}
return $output;
?>
</code>
You'll need to adjust the db_query to include a left join on the {node}
table selecting only node_revisions that have a node.type of e.g.
headlines.
Earnie -- http://for-my-kids.com/
-- http://give-me-an-offer.com/
More information about the support
mailing list