[FIX] Assets Path

This commit is contained in:
Tony Air 2023-04-12 19:04:39 +02:00
parent 30ee3083b8
commit 25cdb138a8
4 changed files with 8 additions and 9 deletions

View File

@ -31,8 +31,8 @@ Dynamic\FlexSlider\Model\SlideImage:
SilverStripe\Core\Injector\Injector:
#SilverStripe\UserForms\Model\UserDefinedForm:
# class: A2nt\CMSNiceties\Extensions\UserDefinedForm_HiddenClass
#Sheadawson\Linkable\Forms\EmbeddedObjectField:
# class: A2nt\CMSNiceties\Extensions\EmbedObjectField
Sheadawson\Linkable\Forms\EmbeddedObjectField:
class: A2nt\CMSNiceties\Extensions\EmbedObjectField
SilverStripe\Forms\CompositeField:
class: A2nt\CMSNiceties\Extensions\CompositeFieldExtension
SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor:

View File

@ -1,15 +1,14 @@
<?php
namespace A2nt\CMSNiceties\Extensions;
use gorriecoe\Embed\Extensions\Embeddable;
use Sheadawson\Linkable\Forms\EmbeddedObjectField;
use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\CompositeField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\ORM\FieldType\DBHTMLText;
class EmbedObjectField extends Embeddable
class EmbedObjectField extends EmbeddedObjectField
{
/**
* List the allowed included embed types. If null all are allowed.
@ -30,10 +29,9 @@ class EmbedObjectField extends Embeddable
* @param array $properties
* @return mixed|DBHTMLText
*/
/*public function FieldHolder($properties = [])
public function FieldHolder($properties = [])
{
$name = $this->getName();
$fields = [
CheckboxField::create(
$name . '[autoplay]',
@ -57,5 +55,5 @@ class EmbedObjectField extends Embeddable
parent::FieldHolder($properties)
)
], $fields));
}*/
}
}

View File

@ -97,6 +97,7 @@ class EmbeddedObjectExtension extends DataExtension
if ($this->owner->getField('Autoplay')) {
$params[] = 'autoplay=1';
$params[] = 'muted=1';
}
if ($this->owner->getField('Loop')) {

View File

@ -137,7 +137,7 @@ class WebpackTemplateProvider implements TemplateGlobalProvider
public static function toPublicPath($path): string
{
$cfg = self::config();
if (strpos($path, '//')) {
if (strpos($path, '//') || strpos($path, '/')) {
return $path;
}