renders item link with panorama
This commit is contained in:
parent
dd5f653fcf
commit
286487db95
|
@ -92,6 +92,8 @@ class PanoramaViewer extends AbstractBlockLayout
|
||||||
array_push($thumbnails, $media->thumbnailUrls());
|
array_push($thumbnails, $media->thumbnailUrls());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$item_id = $attachments[0]->item()->url();
|
||||||
|
$title = $attachments[0]->item()->title();
|
||||||
$width = $block->dataValue('width');
|
$width = $block->dataValue('width');
|
||||||
$height = $width / $block->dataValue('ratio');
|
$height = $width / $block->dataValue('ratio');
|
||||||
return $view->partial('common/block-layout/panorama-viewer', [
|
return $view->partial('common/block-layout/panorama-viewer', [
|
||||||
|
@ -104,6 +106,8 @@ class PanoramaViewer extends AbstractBlockLayout
|
||||||
'id' => 'pv-' . ++$id,
|
'id' => 'pv-' . ++$id,
|
||||||
'mediaTypes' => $media_types,
|
'mediaTypes' => $media_types,
|
||||||
'thumbnails' => $thumbnails,
|
'thumbnails' => $thumbnails,
|
||||||
|
'item_url' => $attachments[0]->item()->url(),
|
||||||
|
'item_title' => $attachments[0]->item()->title(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,9 @@
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div id="<?= $id ?>" class="panorama-viewer"></div>
|
<div id="<?= $id ?>" class="panorama-viewer"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<div class="more-item-info">
|
||||||
|
<a href="<?= $item_url ?>"><?= $item_title ?></a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
Loading…
Reference in New Issue