mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 17:05:54 +02:00
Fix broken template paths in $Content
Use framework logic to get the templates of the current Widget Subclass
This commit is contained in:
parent
7d2dd46159
commit
5d2f0570d8
@ -13,6 +13,7 @@ use SilverStripe\Forms\TextField;
|
|||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\ORM\FieldType\DBHTMLText;
|
use SilverStripe\ORM\FieldType\DBHTMLText;
|
||||||
use SilverStripe\Versioned\Versioned;
|
use SilverStripe\Versioned\Versioned;
|
||||||
|
use SilverStripe\View\SSViewer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Widgets let CMS authors drag and drop small pieces of functionality into
|
* Widgets let CMS authors drag and drop small pieces of functionality into
|
||||||
@ -116,7 +117,7 @@ class Widget extends DataObject
|
|||||||
*/
|
*/
|
||||||
public function Content()
|
public function Content()
|
||||||
{
|
{
|
||||||
return $this->renderWith(array_reverse(ClassInfo::ancestry(__CLASS__)));
|
return $this->renderWith(SSViewer::get_templates_by_class(static::class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user