NAME
PFT::Map::Node - Node of a PFT site map
SYNOPSIS
PFT::Map::Node->new($seqnr, $id, $content);
PFT::Map::Node->new($seqnr, $id, undef, $header);
PFT::Map::Node->new($seqnr, $id, $content, $header);
Nodes are created within a PFT::Map object. The constructor should therefore not be called directly.
Each node is identified by a unique sequence number and by a mnemonic identifier. This details are used within PFT::Map.
DESCRIPTION
Properties
- header
-
Header associated with this node. This property could return undefined for the nodes which are associated with a non-textual content (like images or attachments). A header will exist for non-existent pages (like tags which do not have a tag page).
- content
-
The content associated with this node. This property could return undefined for the nodes which do not correspond to any content. In this case we talk about virtual files, in that the node should be represented anyway in a compiled PFT site.
- date
-
Returns the date of the content, or undef if the content is not recording any date.
- seqnr
-
Returns the sequential id of the node w.r.t. the map
- id
-
Returns the mnemonic unique identifier.
- title
-
Returns the title of the content, if any
- virtual
-
Returns 1 if the node is virtual.
A virtual node
$n
does not correspond with an existing content file. - content_type
-
Returns the type of the content. Short for
ref($node->content)
- html
-
Expand HTML of the content, translating outbound links into hyper-references (hrefs).
Requires as parameter a callback mapping a PFT::Map::Node object into a string representing path within the site. The callback is applied to all symbols, and the resulting string will replace the symbol placeholder in the HTML.
Returns a string with encoded HTML, or an empty string if the node is virtual.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 31:
You forgot a '=back' before '=head1'