Apache-Wyrd
view release on metacpan or search on metacpan
Wyrd/Site/NavPull.pm view on Meta::CPAN
appending the depth level to the template name: list2, item2, selected2,
list3, item3, selected3, etc. If templates for a depth level are not
provided, they default to the next-shallower depth.
Very crude templates are supplied automatically if no level of the template
is specified in the body of the NavPull.
NOTE: There is some support for multiple parentage. If a page declares two
parents (separated by commas), the decision as to how to draw the tree
depends on the referrer field of the HTTP request. If it indicates one of
the ancestors of the page up one geneology, the navigation tree is drawn to
reflect that branch, not the other(s). Multiple parents must belong in the
same section, however, and there can be no circular relationships between
parents.
=head2 HTML ATTRIBUTES
=over
=item root
Wyrd/Site/NavPull.pm view on Meta::CPAN
$found = {};
$this_node ||= $self->dbl->self_path;
$first = 1;
}
if ($this_node eq 'root') {
$self->_debug('parental path is:' . join(':', @path));
return @path;
}
if ($found->{$this_node}++) {
$self->_error(
"Circular geneology for "
. $path[0]
. " detected between: "
. join(', ', sort keys %$found)
. ". Backing out..."
);
return ();
}
my $parents_exist = 0;
foreach my $parent ($self->_next_parents($this_node)) {
if (!$parent and !$parents_exist) {
Wyrd/Site/NavPull.pm view on Meta::CPAN
#NOTE TO SELF: might be better written as _raise_exception
if (!$parent) {
$self->_error("Null parent. Skipping.");
next;
}
push @path, $this_node unless ($first);#don't include self
@path = $self->_get_path($parent, $found, @path);
return @path if (@path);
}
$self->_warn(
"Could not resolve a geneology of $this_node."
) if ($first);
return ();
}
sub _get_section_root {
my ($self) = @_;
my $section = $self->_get_section;
my $children = $self->index->get_children('root', $self->_search_params);
foreach my $child (@$children) {
$self->_verbose("$$child{name} is in section $$child{section}");
( run in 2.621 seconds using v1.01-cache-2.11-cpan-8f98c5d2c55 )