diff --git a/src/Site/BlockLayout/PanoramaViewer.php b/src/Site/BlockLayout/PanoramaViewer.php index bd1a616..efd0138 100644 --- a/src/Site/BlockLayout/PanoramaViewer.php +++ b/src/Site/BlockLayout/PanoramaViewer.php @@ -94,12 +94,13 @@ class PanoramaViewer extends AbstractBlockLayout } } $item_id = $attachments[0]->item()->url(); - $title = $attachments[0]->item()->title(); + //$title = $attachments[0]->item()->title(); + $title = $block->dataValue('title'); $width = $block->dataValue('width'); $height = $width / $block->dataValue('ratio'); return $view->partial('common/block-layout/panorama-viewer', [ 'panorama_type' => $panorama_type, - 'title' => $block->dataValue('title'), + 'title' => $title, 'width' => $width, 'height' => $height, 'autoLoad' => $block->dataValue('autoLoad'), @@ -109,7 +110,6 @@ class PanoramaViewer extends AbstractBlockLayout 'mediaTypes' => $media_types, 'thumbnails' => $thumbnails, 'item_url' => $attachments[0]->item()->url(), - 'item_title' => $attachments[0]->item()->title(), ]); } } diff --git a/view/common/block-layout/panorama-viewer.phtml b/view/common/block-layout/panorama-viewer.phtml index e462fa2..a4f80b5 100644 --- a/view/common/block-layout/panorama-viewer.phtml +++ b/view/common/block-layout/panorama-viewer.phtml @@ -1,40 +1,41 @@ +headLink()->appendStylesheet($this->assetUrl('vendor/pannellum/pannellum.css', + 'PanoramaViewer')); + $this->headScript()->appendFile($this->assetUrl('vendor/pannellum/pannellum.js', + 'PanoramaViewer')); + + if ($panorama_type == "video") { + $this->headLink()->appendStylesheet($this->assetUrl('vendor/video.js/video-js.css', + 'PanoramaViewer')); + $this->headScript()->appendFile($this->assetUrl('vendor/video.js/video.js', + 'PanoramaViewer')); + $this->headScript()->appendFile($this->assetUrl('vendor/pannellum/videojs-pannellum-plugin.js', + 'PanoramaViewer')); + } + if ($title !== false && $title !== "") { + $title = sprintf('

%s

', $title); + } else { + $title = false; + } +?> + + +
- headLink()->appendStylesheet($this->assetUrl('vendor/pannellum/pannellum.css', - 'PanoramaViewer')); - $this->headScript()->appendFile($this->assetUrl('vendor/pannellum/pannellum.js', - 'PanoramaViewer')); - - if ($panorama_type == "video") { - $this->headLink()->appendStylesheet($this->assetUrl('vendor/video.js/video-js.css', - 'PanoramaViewer')); - $this->headScript()->appendFile($this->assetUrl('vendor/video.js/video.js', - 'PanoramaViewer')); - $this->headScript()->appendFile($this->assetUrl('vendor/pannellum/videojs-pannellum-plugin.js', - 'PanoramaViewer')); - } - if ($title !== false && $title !== "") { - $title = sprintf('

%s

', $title); - } else { - $title = false; - } - ?> - - + + +
- - - - - -
+
@@ -64,8 +61,9 @@
- -
+