#exportable
function tag
var $path = <xt:url type="path" />
var $path = call strrev $val=$path
var $path = call strstr $haystack=$path;$needle=/;$before_needle=1
var $path = call strrev $val=$path
var $file = call source $file=/$path;$html_safe=0
var $dau = call strrpos $haystack=$file;$needle=<title>
var $cuoi = call strrpos $haystack=$file;$needle=</title>
var $tag = call substr $val=$file; $start=($dau+7); $length=($cuoi-7-$dau)
var $spc = call chr $val=32
var $tag = call str_replace $subject=$tag;$search=$spc;$replace=</a>, <a href="<xt:url />">;
print Tags: <a href="<xt:url />">$tag</a><br/><h1><a href="<xt:url />"><a href="<xt:url />">$tag</a></h1>
endfunction