Links

The link tag outputs an HTML hyperlink, undoubtedly the most important element in a web page. It consists of one or more parts (separated by a pipe symbol), enclosed in double square brackets:

[[href|text^title|~class|.style|zLink]]

The above is transformed into the following HTML equivalent:

<a href="href" class="class" rel="zLink" style="style" title="title">text</a>

All parts are optional but at least one of them must be present (otherwise no parsing will occur). They can appear in any order, except href (it must be the first).

href
Specifies the link's target location. It can be any of the following:
  • a node
    [[zml]]                          ZML
  • a node id
    [[82]]                           ZML
  • a clip
    [[clip/menu/userGuide*?slc=tree]]link
  • an image
    [[{{10|:src}}|WTF???|zLinkZoom]] WTF???
  • an external URL
    [[http://www.wikipedia.org]]     link
  • if left empty, index will be output
    [[|Home]]                        Home
text^title
Specifies the link's anchor text with an optional tooltip (~title). It can be any of the following:
  • plain text
    [[links|Link to myself]]         Link to myself
  • plain text with a tooltip (very uncommon and not recommended)
    [[links|I have a ...^tooltip!]]  I have a ...
  • an image
    [[links|{{icon1678}}]]           
  • an image with a tooltip (not needed for uploaded images, as the system uses their title as tooltips)
    [[index|{{icon1610}}^Zoglair]]   Zoglair
  • if left empty, a default value will be output depending on href: if it is an external URL, the word “link” will be output. If it is a node, its “Name” will be output instead.
    [[basics]]                       Basics
~class
One or more CSS classes (space delimited). If left empty, the class attribute will be omitted. Zoglair has a lot of ready-to-use classes but you can always add your own. Unfortunately, a full reference of what you can actually enter here is beyond the scope of this guide.
    [[features|~button shadowed]]    Features
.style
One or more CSS rules (semicolon delimited). If left empty, the style attribute will be omitted. Unfortunately, a full CSS reference is beyond the scope of this guide.
    [[features|.letter-spacing:1em]] Features
zLink
Specifies the link's rel attribute, which (in zoglair) is used for unobtrusive javascript behavior. If left empty, the rel attribute will be omitted, unless href is an external URL. In such case, a nofollow value will be used.
A zLink can be any of the following:
  • zLinkExternal
    It directs the link to a new browser tab (this happens automatically for external URLs).
    [[|zLinkExternal]]               Home
  • zLinkInto id
    This is a div with id="zLinkTest1". Click "Ajax Rules!" repeatedly and watch me change!

    It directs the link to an element with specified id. It is mostly useful with ajax requests.
    [[clip/lipsum/?ajax=1|Ajax Rules!|zLinkInto zLinkTest1]]
                                     Ajax Rules!
  • zLinkConfirm
    It asks for confirmation before following the link.
    [[|zLinkConfirm]]                Home
  • zLinkConfirmInto id
    A combination of the previous two zLinks.
    [[clip/lipsum/?ajax=1|Ajax Rules!|zLinkConfirmInto zLinkTest1]]
                                     Ajax Rules!
« Phrases Media »
(C) Nick B. Cassos - All Rights Reserved
powered by zoglair
page generated in 32ms (11 queries, 5ms)