Node

Node

(How to) How to show all nodes tagged with children terms with Views 2 for Drupal 6

How to : How to show all nodes tagged with children terms with Views 2 for Drupal 6

(Article) Using Node Access

Article : Using Node Access

(How to) How to build a node in Drupal programmatically

How to : How to build a node in Drupal programmatically

Sometimes you want to create a page or a story, or any other node-based piece of content (but not content-type) programmatically. I've searched for explanation, and once again, when I can't find something fast, I share it here. In this case I had to have some conversations.

It's quite simple. Turns out Drupal uses php standard class as the base for its nodes.

Here's how you build a node type page.

(Tips) Drupal - how to display block in node?

Tips : Drupal - how to display block in node?

There used to be a module that did this, but I forget what it's called, and am unsure as to its compatibility with various versions of Drupal. The easiest and most direct way to place the contents of a block in a page are using the following PHP snippet:

<?php
$block = module_invoke('menu', 'block', 'view', 26);
print $block['content'];
?>

(Tutorial) Programmatically Create, Insert, and Update CCK Nodes

Tutorial : Programmatically Create, Insert, and Update CCK Nodes

(Tutorial) Drupal Node Module Skeleton

Drupal node module skeleton

Recipe for creating a node module skeleton:

1. Create three files using the code snippets at the bottom of this post

foo.info
foo.module
foo.theme

Note: replace foo with your module name. If this is for a specific project, use project codes in the format [pc][nodetype]

Syndicate content