Drupal: .htaccess Access Deny
August 21, 2012 – 7:59 am | No Comment

In this article I will tell how to forbid access to certain resources for some clients. The instructions will include descriptions of different directives.

First let’s speak about Order directive of .htaccess file of Apache server.
Description: …

Read the full story »
CSS Templates

Contain reviews and news about CSS Templates.

Freebies

Contain freebies such as icons, graphics, headers and images for your websites.

Fun Stuff

Contains other fun stuff for entertainment or interesting site showcase.

How-To

Contain technical elaborations on some specific workarounds or common tweak.

Joomla Templates

Contains reviews and news about Joomla templates.

Home » How-To

Drupal: How to Display List of Nodes Instead of Teasers on a Term Page

Submitted by on September 30, 2010 – 9:15 amNo Comment

This article would tell you how to display list of all nodes of a specified taxonomy vocabulary dividing the list by node type.

We will use standard theming function to create a list:

$tid = 2;
$sql = “SELECT n.title, n.nid, nt.name AS type_name
FROM {node} AS n
INNER JOIN {node_type} AS nt USING (type)
INNER JOIN {term_node} AS tn USING (nid)
WHERE tn.tid=%d AND n.status = 1
ORDER BY nt.name DESC, n.created DESC”;
$result = db_query($sql, $tid);
while ($n = db_fetch_object($result)) {
$terms_links[$n->type_name][] = l($n->title, ‘node/’. $n->nid,
array(‘attributes’ => array(‘class’ => ‘vocabulary-list’)));
}
foreach ($terms_links as $type_name=>$nodes) {
$content .= theme(‘item_list’, $nodes, check_plain($type_name));
}
echo $content;

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.