Here is a list of tags Linodef offers. For the most updated list including more examples refer to the filter/tips page of your site that uses Linodef.

Embed elements

To embed elements into your text, prepend the element ID with the hash key # and surround them by brackets []: [#ID]. That way a node title is inserted and linked. To embed the content of a supported field add the field name: [#ID:field_name]. Moreover it is possible to add a field value number in the case you have a field with multiple values and want to use a different value than the first: [#ID:field_name:number]. This is also called the short syntax (see below).

  • Embed node title and link to the node: [#ID]
  • Embed field value and link to the node: [#ID:field_name]
  • Embed certain field value and link to the node: [#ID:field_name:field_value_number]

Alter embedding by tag options

Tag options can modify the ID type and the embed method. They are entered right after the ID or the field settings and are separated by a comma. The number of options a tag can have is not limited.

  • Embed an element with options: [#ID,option1,option2="optionvalue",...]

Examples for options

  • Use the option type="term" to embed a taxonomy term instead of a node: [#5,type="term"]
  • Use the embed modification option "nolink" to prevent that the embedded object gets linked: [#5,nolink]
  • Combine options in any sequence: [#5,type="term",nolink] == [#5,nolink,type="term"]

Short syntax

The options content and contentvalue support the short syntax where the option name can be left out. Example for option content:

  • without short syntax: [#ID,content="field_name",option2="optionvalue",...]
  • using short syntax: [#ID:field_name,option2="optionvalue",...]

As you can see the short syntax is separated from the ID by a : and not by a comma. Example for content and contentvalue:

  • without short syntax: [#ID,content="field_name",contentvalue="3",option3,...]
  • using short syntax: [#ID:field_name:3,option3,...]

Use comments to flag your tags for editors

Tag comments act as an indicator for Linodef tags, to describe your tag for yourself or other editors. Comments are visible only during editing and never appear by viewing a text. The nature of comments is that they must not modified automatically and therefore will not change unless you change it. This is important to understand since the content the tag displays can change automatically and so the comment may be outdated. So try to use a common description.

  • Use comments to give information about the tag during editing: [#ID comment]
  • Comment a field content: [#ID:field_name:field_value_number comment]
  • Comments work together with options: [#ID:field_name:field_value_number,option1,option2="optionvalue",... comment]

Layout of embedded elements

The layout depends on the input format of the current textfield (that embeds the element with a Linodef tag) and not of the input format the embedded field has set. Therefore the layout can differ from the original layout if you use different input formats.

  • If it is likely that complete views are embedded then make sure the input format allows <table>, <tr> and <td> tags.
  • If embedded fields contains Linodef tags then those tags are removed to avoid an infinite recursion. This is the case if users refer fields to each other or to itself with Linodef tags.

Buttons

Because you won't be able to remember every node or term ID Linodef provides editor buttons.

Comments

Pepe Roni’s picture

If embedded fields contains Linodef tags then those tags are removed to avoid an infinite recursion. This is the case if users refer fields to each other or to itself with Linodef tags

Why not limit recursion to a recursion depth other than 1, that can be set in linodef administration settings? Then true recursion is possible. Or add an option depth="number" that is heeded on level 1 only?


..........
Wilfried
Drupal: a CMS without typo in its name
Roi Danton’s picture

This should be added as a feature request in the issue queue.

Pepe Roni’s picture

In filter/tips you write [#id,tid] for terms and here you write [#5,type="term"]. Are both valid or becomes [#id,tid] deprecated in the future? Can you explain?


..........
Wilfried
Drupal: a CMS without typo in its name
Roi Danton’s picture

tid, nid and viewid are marked as deprecated. The support of those options is continued for those that already use Linodef. @filter/tips: This is a documentation bug which will be removed in final release. Please open a bug issue in the Linodef queue.

Pepe Roni’s picture

I feel like it is not clear from your description, what separates a comment from options. It is the little blank character! Everything between the first blank, that is not surrounded by quotes until the first ] is heeded as comment. Thus comments can not be separated from the last option by a comma (it would be handled like an option and lead to an error). And on the other hand, options must be separated by comma (and not by something like the sequence comma, blank) from one another. Am I right?


..........
Wilfried
Drupal: a CMS without typo in its name
Roi Danton’s picture

Yes, comments are separated by a leading space. Options are separated by a comma only and not by an additional space (the following options will be recognized as a comment then and a message about a wrong placed comma appears).

A space inside a Linodef tag should be used only within option values,
e.g. [#5,override="Here spaces are allowed."]
or before and inside a comment,
e.g. [#5,override="Here spaces are allowed." Comments may have spaces too.].

Thus comments can not be separated from the last option by a comma (it would be handled like an option and lead to an error)

In this case Linodef removes the wrong option and embeds the tag as usual and outputs a message that this tag has an invalid option "option".
If the comment is separated by comma and space, e.g. [#5,nolink, Comment about not linked node.], then the trailing comma is removed automatically, the tag is embedded and a message that this tag has a wrong placed comma will appear.