Nodereference Embed

Component ID

2047669

Component name

Nodereference Embed

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

786

Component created

Component changed

Component body

If you have ever faced the problem of referencing content from the node's body text, you might have already tried various modules, e. g. like Node Embed, LinkIt or Insert. However, if you want to have a "real" reference - and not just the rendered output - like CCK's nodereference, you should have a look at this module.

Nodereference Embed provides a configurable and themeable (pseudo) token that links other assets, such as a node or user. Currently, it can be inserted and interpreted in the node's body text. When viewing the node the token is also rendered by its actual theme output. This functionality is comparable to Wordpress' shortcode API. So, finally what you get with this module is a Macro code in Drupal's token style.

Usage

Basic usage: [node id=NID] and [user id=UID]
Advanced usage: [node id=NID type=[default|link] arg1=XXX arg2="XX Y"]

The "id" - as the only mandatory parameter - has to be replaced with the actual asset id, such as node or user id. Another fixed, but optional parameter is "type" which accepts two styles out of the box: "default" renders the asset title and "link" a asset link. You can add styles with custom plugins, see "Writing your own plugin". Optionally, an arbitrary number of arguments can be passed after the id property. These options will have to be interpreted by your custom plugin.

Writing your own plugin

See README.txt.

Known issues

- Not compatible with aggressive or external caching, custom cache invalidation logic required

TODO

- WYSWIG editor integration
- Advanced plugins, e. g. views, panels, CCK etc