Hello,
I tried displaying related objects on the object-detail-page with
{{{<ifcount code="ca_objects.related" min="1"><H6>Zugehörige Bilder</H6>
<div class="row">
<div id="browseResultsContainer">
<?php print caBusyIndicatorIcon($this->request).' '.addslashes(_t('Loading...')); ?>
</div><!-- end browseResultsContainer -->
</div><!-- end row -->
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#browseResultsContainer").load("<?php print caNavUrl($this->request, '', 'Search', 'objects', array('search' => 'ca_objects.idno:^ca_objects.idno'), array('dontURLEncodeParameters' => true)); ?>", function() {
jQuery('#browseResultsContainer').jscroll({
autoTrigger: true,
loadingHtml: '<?php print caBusyIndicatorIcon($this->request).' '.addslashes(_t('Loading...')); ?>',
padding: 20,
nextSelector: 'a.jscroll-next'
});
});
});
</script>
</ifcount>}}}
This works in general and i like the look, but leaves me with two isssues:
- Other objects with related objects continue to show the related objects of previous datasets. Is this a cache-issue and is there a way to bypass this?
- The "main" object is also shown as its own "related object".
Id guess its a rather trivial question for a more expirienced user, wich I am unfortunately not. :'D
Does anyone knows a way to avoid both problems or even a different way to display thumbnails of the related objects?
Kind regards,
Bernhard