Insert elements & internal links (Linodef)
Linodef is a filter for internal links and dynamic element embedding based exclusively on IDs. It provides tags to insert/embed/inline and link the following element types:
- nodes
- fields: Computed Field, Datefield, Number, Textfield
- taxonomy terms
- Planned: Image- & Filefield, View Reference, comments, views
Moreover Linodef supplies (optional) buttons for supported editors to insert the tags into text and body fields. The buttons contain a list of elements (e.g. node titles) with the corresponding Linodef tag. The user can select an element with the help of an itemlist or an autocomplete field. A button is created by defining different elementtypes.
Application field
Those tags are required if you have a text that needs to include references to other elements or contains content which is already available in other elements. Some examples:
- You write an article that refers to things you've already saved as node or taxonomy term or you want to quote news/other articles (yes, you can dynamically embed whole texts, with or without linking them).
- You write a thesis with many difficult terms (the spelling of some of them will change likely) and you require (1) a common spelling as well as (2) links to an explanation for yourself and your readers (each term is a node or taxonomy term).
- You write a book and you expect that names of characters will change during the writing process (each character has a node with fields for firstname, nickname, surname etc).
- You have a forum and your users want to link to other threads and include their titles in a simple manner.
This is only an incomplete list of examples. Linodef is applicable in many more cases than those.
Differences of Linodef in comparison to similar modules
To achieve the required flexibility the ID of a node, ID of a term and optionally a fieldname are the only elements that are saved within your text. The other data is included on-the-fly. That is the difference to similar filter modules that uses node names to create links (wiki-like behavior) or that limit their tags to the Node ID, too, but do not embed anything else. Following is a list of advantages the method Linodef uses has:
- if you change the title or field value of the linked node then the title or field value are updated in your text automatically
- if you change the name of a term then the name is updated in your text automatically
- if the node or term has a path alias then that is used instead of the default /node and /term path (if you change it, it is updated too)
- links don't break even if you change the title of a linked node or the name of a linked taxonomy term
- the tags are hardcoded and thus reliable so other modules can work with those tags
- the tag syntax is extensible due to tag options i.e. in the future more element types can be supported without the need for a syntax change
- you may use tag comments to flag your tags for other editors and yourself
- a tag validation system sends messages to the text and/or the Drupal message system so the user knows if he entered a tag with a wrong syntax and knows how to correct this (optional, messages can be deactivated)
- buttons are provided which ease the selection and inclusion of tags
More information
The Linodef package ships with a documentation. To read this Advanced help is required. Alternatively an (almost) identically documentation is found here at drupal.org. The most important parts for a newcomer might be:
- Supported editors by editor support modules. You are encouraged to write your own editor submodule to support the editor of your choice. See Buttons API.
- Supported permissions.
The module provides an pot file to translate it in other languages. Currently the following translations are included:
- German (module texts & complete documentation)
Dependencies
- CCK
- Text (part of CCK)
- Taxonomy (part of Drupal core)
Optional:
- Content Permission (part of CCK) to heed the permissions set with this module.
- Supported editor modules to use buttons for those editors.
- Supported field modules to embed those fields.
Important upgrade hints
from rc1 to rc2
- the layout of the tags has change to a more flexible structure hence your old term and no link tags from rc1 won't work anymore (for node and field tags there is no difference)
- deactivate all Linodef modules, delete the linodef folder in your modules directory and upload the new linodef folder from rc2 (since Button API got an own submodule and BUEditor submodule got renamed)
Long term issues
- #334520: Consider support for WYSIWYG and Inline APIs to support all editors WYSIWYG API supports. Help to finish WYSIWYG API or providing patches for Linodef is appreciated.
Releases
| Official releases | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.0-rc2 | 2008-Dec-03 | 59.87 KB | Download · Release notes | Recommended for 6.x | |
| Development snapshots | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.x-dev | 2009-Jul-06 | 67.53 KB | Download · Release notes | Development snapshot | |
