mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Fix virtual pages not returning correct content (from r98520)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102762 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
394cddb4e6
commit
9f2f88fb28
@ -226,6 +226,8 @@ class VirtualPage extends Page {
|
||||
$return = $this->copyContentFrom()->$funcName();
|
||||
} else if($this->copyContentFrom()->hasField($field)) {
|
||||
$return = $this->copyContentFrom()->getField($field);
|
||||
} else if($field == 'Content') {
|
||||
return '<p>' . _t('VirtualPage.NOTFOUND', 'We could not find the content for this virtual page.') . '</p>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -261,13 +263,6 @@ class VirtualPage extends Page {
|
||||
if (!$haveIt) $haveIt = $this->copyContentFrom()->hasMethod($method);
|
||||
return $haveIt;
|
||||
}
|
||||
|
||||
/**
|
||||
* If we ever get this far, it means that the VP failed.
|
||||
*/
|
||||
function Content() {
|
||||
return '<p>'._t('VirtualPage.NOTFOUND', 'We could not find the content for this virtual page.').'</p>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user