Start page

Mykola Zharkikh (Kyiv)

Personal site

?

Links

GetSelfLink

Module: smeretags/substfields.php (available by default)

Options: no.

Purpose: Generates a link to the context node, for which smeretag is calculated. Text of the link is the result of DocTitle method invocation for the node.

Example call: <Smereka Func="GetSelfLink" />

Example result: <a href="https://www.m-zharkikh.name/en/Smereka/Smeretags/Links.html">Links</a>

GetURL

Module: smeretags/substfields.php (available by default)

Options: [NodeId] [URLMode] [Query] [Fragment]

Purpose: Generates a URL for the node.

Optional NodeId parameter specifies the node to calculate the URL. If this parameter is omitted, URL calculated for the context node.

Optional URLMode parameter specifies the mode of address forming. If this parameter is omitted, URL is computed using the current mode of address forming.

Optional Query parameter define the string of parameters to append to the address (default – empty string).

Optional Fragment parameter specifies the name of the piece to append to address (default – empty string).

Example call: <Smereka Func="GetURL" NodeId="1075" Query="Param1=Value1" Fragment="SomeText" />

Example result: https://www.m-zharkikh.name/en/Smereka.html?Param1=Value1#SomeText

Smeref

Module: smeretags/substfields.php (available by default)

Options: [NodeId] [URLMode] [Query] [Fragment] [SMText="Auto"]

Purpose: Generates a link to the node.

If an optional parameter SMText="Auto" defined, text of the link will be created by calling DocTitle method for the node. If this parameter is omitted, one should explicitly specify the link text.

Effects of other listed options described in GetURL smeretag. Standard HTML attributes (class, title…) are transmitted in the generated anchor tag.

Example call: <Smereka Func="Smeref" NodeId="1075" SMText="Auto" />

Example result: <a href="https://www.m-zharkikh.name/en/Smereka.html">Smereka</a>

Example call: <Smereka Func="Smeref" NodeId="1075" class="AClass">Link text</Smereka>

Example result: <a href="https://www.m-zharkikh.name/en/Smereka.html" class="AClass">Link text</a>

SmerefRelative

Module: smeretags/substfields.php (available by default)

Options: rel [smeretag Smeref options]

Purpose: Generates a link to the node which position is defined relative to the context nodes.

Required parameter rel may be one of the following:

first – the first node of the project; if the context node does not belong to the project – the same as firstsibl.

firstchild – the first child node.

firstsibl – first sibling node.

prev – previous sibling node or parent node; and if the context node does not belong to the project – the same as prevsibl.

prevsibl – previous sibling node.

next – next node in the tree of the project; if the context node does not belong to the project – the same as nextsibl.

nextsibl – the next sibling node.

last – the last node in the tree of the project; if the context node does not belong to the project – the same as lastsibl.

lastchild – the last child node.

lastsibl – the last sibling node.

root – root node of the project; if the context node does not belong to the project – the same as the parent.

parent – the parent node.

This smeretag does not use NodeId parameter – destination node is always defined relatively to the context nodes.

Behavior of this smeretag essentially depends on whether the context node is belong to the project, ie whether it has the ProjectId attribute, which is a pointer to the root node of project.

Example call: <Smereka Func="SmerefRelative" rel="prev">Previous node</Smereka>

Example result: <a href="https://www.m-zharkikh.name/en/Smereka.html">Previous node</a>

SmerefThumb

Module: smeretags/substfields.php (available by default)

Options: [smeretag Smeref options] [ImageAttr] [border] […]

Purpose: Generates a link to the node as the little picture (thumbnail).

To use this smeretag effectively, its NodeId value should point to the node, which has a graphic file attribute. The name of this attribute can be set via ImageAttr parameter (default – Image). Optional border parameter have the default value 2.

Example call: <Smereka func="SmerefThumb" Node="1081" />

Example result: <a href="https://www.m-zharkikh.name/en/Gallery/Landscapes/KarpatianSmereka.html"><img src="https://www.m-zharkikh.name/files/MZh/gallery/paysages/_thumbs/076-12.jpg" width="200" height="130" border="2" alt="Silver firs against the backdrop of the hill (Slavske town, 1979)" title="Smereka trees in the Carpathians"/></a>