myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1565883 - /myfaces/site/cms-site/trunk/lib/view.pm
Date Sat, 08 Feb 2014 03:03:44 GMT
Author: lu4242
Date: Sat Feb  8 03:03:44 2014
New Revision: 1565883

URL: http://svn.apache.org/r1565883
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=1565883&r1=1565882&r2=1565883&view=diff
==============================================================================
--- myfaces/site/cms-site/trunk/lib/view.pm (original)
+++ myfaces/site/cms-site/trunk/lib/view.pm Sat Feb  8 03:03:44 2014
@@ -46,9 +46,14 @@ sub single_narrative {
     # render sitemap stuff
     my $pagetree = ${args{headers}}{pagetree}; 
     if ($pagetree) {
-        $args{ttitle} = "Page tree generated";
-        my($tfile, $tdir, $text) = fileparse($args{path});
-        $args{pagetree} = pagetree($tdir);
+        my($ptfile, $ptdir, $ptext) = fileparse($args{path}, qr/\.[^.]*/:);
+        $page_path = "$ptdir$ptfile/";
+        $args{ttitle} = "Page tree generated $page_path";
+        if (-d $page_path) {
+            $args{pagetree} = pagetree($page_path);
+        } else {
+            $args{pagetree} = pagetree($tdir);
+        }
     }
     
     # render tip box with reference to Confluence export



Mime
View raw message