npsobj insertvalue anchor

Syntax

npsobj_insertvalue_anchor ::= 
  <npsobj insertvalue = "anchor"
    name = "name" 
    { other_attribute } >
    content
    </npsobj>

other_attribute ::= string = "string"

Task

This instruction creates an a element. The evaluated content of the instruction becomes the content of the a element. The generated a tag contains the following attributes:

  • An href attribute is generated. For determining its value, a URL for name is determined. name must yield a file context.

  • All attributes of the NPSOBJ tag except insertvalue and name are added to the resulting a tag after the @ references contained in their values, if any, have been resolved.

To create a link to the current file, an NPSOBJ insertvalue=anchor instruction with name="self" can be used.

Example

The code below creates a link to the folder containing the current file (i.e. to the parent folder). The title of this folder is used as the linked text.

<npsobj insertvalue="anchor" name="parent">
  <npsobj insertvalue="var" name="parent.title"/>
</npsobj>