URL generation for SubList
[scpubgit/SCS.git] / lib / SCSite / Page.pm
index 223b92b..a0e5c15 100644 (file)
@@ -3,15 +3,16 @@ package SCSite::Page;
 use IO::All;
 use Moo;
 
-has $_ => (is => 'ro') for qw(title description keywords body created);
+has $_ => (is => 'ro') for qw(title description keywords body created path);
 
-has "_$_" => (is => 'ro', init_arg => $_) for qw(page_set path);
+has "_$_" => (is => 'ro', init_arg => $_) for qw(page_set);
 
 sub children {
   my ($self) = @_;
   my $ps = $self->_page_set;
   (ref $ps)->new(
-    base_dir => io->dir($ps->base_dir)->catdir($self->_path),
+    top_dir => $ps->base_dir,
+    base_dir => io->dir($ps->base_dir)->catdir($self->path),
     max_depth => 1
   );
 }