Guten Morgen, ich hatte bei einer Webseite die nicht mehr in Betrieb ist so etwas ähnliches verbaut.
Code auf der Detailseite (Objekte)
PHP
<?php
$gid = path_to_id($GLOBALS['gallerypath']);
?>
<we:listview workspaceID="\$gid" name="ImageGallery" contenttypes="img" searchable="false" order="random()">
Bei neueren Seiten verwende ich aber nur noch Sammlungen für die Fotos:
Code
<we:ifVarNotEmpty match="foto-sammlung">
<we:var nameto="photos-id" to="global" type="collection" name="foto-sammlung" />
<we:listview type="collectionitems" id="\$photos-id" name="foto-sammlung">
<div class="row">
<we:repeat>
<div class="col-sm-4 col-xs-6 text-center mb-3">
<a data-alt="<we:field type="img" name="WE_PATH" only="alt" />" data-fancybox="images" data-caption="<we:field type="img" name="WE_PATH" only="alt" />" data-src="<we:field type="img" name="WE_PATH" thumbnail="960-foto-album" only="src" />" class="search-icon" href="<we:field type="img" name="WE_PATH" only="src" />"><img alt="<we:field type="img" name="WE_PATH" only="alt" />" class="img-fluid" src="<we:field type="img" name="vorschau" thumbnail="400fit" only="src" />"></a>
</div>
</we:repeat>
</div>
</we:listview>
</we:ifVarNotEmpty>
Alles anzeigen
Ich hoffe das bringt dich weiter.