You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2014/02/08 04:50:27 UTC
svn commit: r1565908 - /myfaces/site/cms-site/trunk/lib/view.pm
Author: lu4242
Date: Sat Feb 8 03:50:27 2014
New Revision: 1565908
URL: http://svn.apache.org/r1565908
Log:
test how to fix documentation
Modified:
myfaces/site/cms-site/trunk/lib/view.pm
Modified: myfaces/site/cms-site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/myfaces/site/cms-site/trunk/lib/view.pm?rev=1565908&r1=1565907&r2=1565908&view=diff
==============================================================================
--- myfaces/site/cms-site/trunk/lib/view.pm (original)
+++ myfaces/site/cms-site/trunk/lib/view.pm Sat Feb 8 03:50:27 2014
@@ -47,13 +47,11 @@ sub single_narrative {
my $pagetree = ${args{headers}}{pagetree};
if ($pagetree) {
my($ptfile, $ptdir, $ptext) = fileparse($args{path}, qr/\.[^.]*/);
- my $page_path = "content$ptdir$ptfile/";
- $args{ttitle} = "Page tree generated $page_path";
- if (-d $page_path) {
- $args{pagetree} = pagetree($page_path);
- } else {
- $args{pagetree} = pagetree($ptdir);
+ my $basePath = "$ptdir$ptfile/";
+ if (!(-d "content$page_path")){
+ $basePath = "$ptdir";
}
+ $args{pagetree} = pagetree("content$basePath");
}
# render tip box with reference to Confluence export
@@ -325,7 +323,8 @@ sub pagetree {
# my $dir = @_;
# my $dir = "/content/wiki/core/user-guide/";
# my $file = "content/wiki/core/user-guide/sitemap.html";
- my $file = shift;
+ my $baseDir = shift;
+ my $file = $baseDir;
my ($dir) = ($file =~ /^(.*)\/.*?/);
my $entries = {};
sitemapFind($dir, $entries);
@@ -335,7 +334,7 @@ sub pagetree {
# $tdir =~ s{/\z}{};
my $sitemap = "<ul>\n";
- $sitemap = sitemapRender($sitemap, $entries, "$file");
+ $sitemap = sitemapRender($sitemap, $entries, "$baseDir");
$sitemap .= "</ul>\n";
return $sitemap;