BUGFIX #3858: Updated StaticExporter to handle nested pages.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@88513 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew Short 2009-10-11 00:08:04 +00:00 committed by Sam Minnee
parent 5ff81a3e51
commit 982d79e7e1

View File

@ -61,8 +61,8 @@ class StaticExporter extends Controller {
// iterate through all instances of SiteTree
$pages = DataObject::get("SiteTree");
foreach($pages as $page) {
$subfolder = "$tmpFolder/$page->URLSegment";
$contentfile = "$tmpFolder/$page->URLSegment/index.html";
$subfolder = "$tmpFolder/" . trim($page->RelativeLink(null, true), '/');
$contentfile = "$tmpFolder/" . trim($page->RelativeLink(null, true), '/') . '/index.html';
// Make the folder
if(!file_exists($subfolder)) {