You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2012/11/26 11:27:48 UTC
svn commit: r1413544 - /isis/site/trunk/lib/view.pm
Author: danhaywood
Date: Mon Nov 26 10:27:47 2012
New Revision: 1413544
URL: http://svn.apache.org/viewvc?rev=1413544&view=rev
Log:
working on isis documentation page
Modified:
isis/site/trunk/lib/view.pm
Modified: isis/site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/isis/site/trunk/lib/view.pm?rev=1413544&r1=1413543&r2=1413544&view=diff
==============================================================================
--- isis/site/trunk/lib/view.pm (original)
+++ isis/site/trunk/lib/view.pm Mon Nov 26 10:27:47 2012
@@ -99,6 +99,37 @@ sub basic {
}
+sub _breadcrumbs {
+ my $path = shift;
+ my $base = shift;
+
+ my $index = "$base/index.html";
+ $index =~ s,/+,/,g;
+
+ my @breadcrumbs = (
+ qq|<a href="$index">Home</a>|,
+ );
+ my @path_components = split( m!/!, $path );
+ pop @path_components;
+
+ my $relpath = $base;
+
+
+ for (@path_components) {
+ $relpath .= "$_/";
+ $relpath =~ s,/+,/,g;
+ next unless $_;
+
+ my @names = split("-", $_);
+ my $name = "";
+ for my $n (@names) {
+ $name .= ucfirst($n) . " ";
+ }
+ $name =~ s/ *$//;
+ push @breadcrumbs, qq(<a href="$relpath">\u$name</a>);
+ }
+ return join " » ", @breadcrumbs;
+}
sub _base {
my $path = shift;