Made to Order Software Corporation Logo

insert

Insert Node Parameter: page (6-1.2)

Display the body of the node, the terms, the CCK fields, and the links. Input filters are applied.

In this case the Insert Node tells the node that it is its page. Some modules will react differently than when body is used.

CSS Class: div.insert-node-page

Theme: InsertNode_page

See Also: Insert Node Parameter: body (5-1.x)

Insert Node Parameter: body (5-1.x)

Display the body of the node, the terms and the CCK fields. Input filters are applied.

CSS Class: div.insert-node-body

Theme: InsertNode_body

See Also: Insert Node Parameter: content (6-1.0), Insert Node Parameter: page (6-1.2), Insert Node Parameter: teaser (5-1.x), Insert Node Parameter: themed (6-1.0)

Insert Node Parameter: title (6-1.1)

Display the title of the node inside an <h3> tag. It is otherwise unthemed.

To avoid the <h3> tag, use cck=title;, link, or more instead.

CSS Name: h3.insert-node-title

See Also: Insert Node Parameter: cck (6-1.2)

See Also: Insert Node Parameter: target (6-1.4) [no content]

See Also: Insert Node Parameter: link (5-1.0)

See Also: Insert Node Parameter: more (6-1.1)

Insert Node Parameter: themed (6-1.0)

Display the themed body of the node and the terms as if you were looking at that very node.

The CCK fields and links are not shown. The filters are not applied.

This means if you use a filter such as the footnotes filter with [fn]Info tags, they will NOT be transformed.

CSS Class: no class is added, this keyword returns the theme() call content immediately.

Theme: InsertNode_themed

See Also: Insert Node Parameter: body (5-1.x)

Insert Node Usage

Syntax

The Insert node tag syntax is:

   [node:<name of node> <parameters>]

Name of node

The <name of node> can either be

  • The name of the node, i.e. it's URL without the protocol and domain1, or
  • The node identifier (the number you see in your URL when you edit the node), or
  • An asterisk (*) in which case the current node applies2
    • 1. For instance, to insert this very node, I would use the name doc_insert_node_usage.
    • 2. The asterisk is useful to repeat something from the node in a block. This could be the title of the node or a CCK field. I would suggest ...

Coming back at the right place when adding/editing/deleting Comments

It is now possible (See #418004: Comments included --> Back after reply) to have Drupal send you back to the page that inserts the node instead of the inserted node. Say you create node A and B. You include node A inside node B. You are looking at node B now. You decide to add a comment on node A (that you see from within node B.) Click on the Add new comment link, write the comment and click Save. At that point, you probably want to come back to node B instead of node A.

This feature is only necessary if you have the links at the bottom of the node and allow comments to show up.

The ...

Upgrading from version 1.0/1.1 to 1.2 or newer (or -dev) for Drupal 6.x users

I changed the name of the module back to InsertNode (although I did not want to, I did not want to jeopardize the Drupal 5 version... which would probably have been fine, but well...)

So, the newer version of the D6 module is again called InsertNode.

To upgrade you will want to keep the other version running until you get the new version as the replacement (although you can manage your site the way you'd like this procedure let you switch from the previous version to the new version without having to turn off your site for a little while.)

  1. Extract the new version, it adds InsertNode ...

InsertNode Installation

Decompress the module in your sites/all/modules folder.

Go to admin/build/modules (Admin » Site Building » Modules) and select the new module (under package named "Filters input".)

Go to admin/settings/filters (Admin » Site Configuration » Input formats) and select the Insert node filter1.

Make sure that the text areas using the [node:...] tag make use of one of the formats having this Insert node filter ...

  • 1. It is suggested that you create a new format if you are to use this filter only on a few pages. This way, you avoid wasting time on all pages.

InsertNode Compatibility (D5/D6)

Version 6.x added many new features (parameters, themes, etc.) to the module. However, the tags themselves remain backward compatible except for those two parameters:

  • collapsible
  • collapsed

The D5 version will insert the node content and make it collapsible or collapsed.

The D6 version inserts nothing on these parameters. It only makes the result collapsible or collapsed.

So if you are using D5 and want to keep the collapsible and collapsed look the same, you must add the body keyword as in:

[node:123 body collapsible]

[node:123 body collapsed]

InsertNode (The module —)

Check it out!
Drupal Modules
by
Made to Order Software!

The following pages are the official documentation of the InsertNode module available on Drupal.

This module is a filter used to insert a node in another. Version 5.x is only being maintained. Version 6.x still evolves as time passes. It is already pretty powerful!

Since this is a filter, you can use it to insert a node in any text area that supports filters by including the InsertNode filter in it.

It works by using the simple syntax:

[node:<node name or nid or *1

  • 1. The asterisk can be used to reference the current ...