mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT Allowing Widget->Content() to render with any templates found in ancestry instead of requiring a template for the specific subclass
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85823 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0cc95bec5f
commit
6b51ccebf3
@ -55,7 +55,7 @@ class Widget extends DataObject {
|
||||
* @return string HTML
|
||||
*/
|
||||
function Content() {
|
||||
return $this->renderWith($this->class);
|
||||
return $this->renderWith(array_reverse(ClassInfo::ancestry($this->class)));
|
||||
}
|
||||
|
||||
function Title() {
|
||||
@ -176,7 +176,7 @@ class Widget_Controller extends Controller {
|
||||
* @return string HTML
|
||||
*/
|
||||
function Content() {
|
||||
return $this->renderWith($this->widget->class);
|
||||
return $this->renderWith(array_reverse(ClassInfo::ancestry($this->widget->class)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user