Hi,
In the detail page of object, add this:
<!-- Related lots -->
{{{<ifcount code="ca_object_lots" min="1"><h6>Related lot:</h6></ifcount>}}}
{{{<unit relativeTo="ca_object_lots"><l>^ca_object_lots.preferred_labels</l></unit>}}}
This creates a link on the title of the lot.
But maybe in your system, the detail page for object lots does not exist. You may create a ca_object_lots_default_html.php
file containing what you want to display in this detail page.
In my case I don't need to display object lots, but I made a detail page for test:
<?php
$t_item = $this->getVar("item");
$va_comments = $this->getVar("comments");
$vn_comments_enabled = $this->getVar("commentsEnabled");
$vn_share_enabled = $this->getVar("shareEnabled");
?>
<div class="row">
<div class='col-xs-12 navTop'><!--- only shown at small screen size -->
{{{previousLink}}}{{{resultsLink}}}{{{nextLink}}}
</div><!-- end detailTop -->
<div class='navLeftRight col-xs-1 col-sm-1 col-md-1 col-lg-1'>
<div class="detailNavBgLeft">
{{{previousLink}}}{{{resultsLink}}}
</div><!-- end detailNavBgLeft -->
</div><!-- end col -->
<div class='col-xs-12 col-sm-10 col-md-10 col-lg-10'>
<div class="container">
<div class="row">
<div class='col-md-12 col-lg-12'>
<h4>{{{Lot : ^ca_object_lots.preferred_labels}}}</h4>
<p>{{{^ca_object_lots.description}}}</p>
<HR>
{{{<ifcount code="ca_collections" min="1" max="1"><H6>Related collection:</H6></ifcount>}}}
{{{<ifcount code="ca_collections" min="2"><H6>Related collections:</H6></ifcount>}}}
{{{<unit relativeTo="ca_collections" delimiter="<br/>"><l>^ca_collections.preferred_labels.name</l></unit>}}}
{{{<ifcount code="ca_storage_locations" min="1" max="1"><H6>Related storage location:</H6></ifcount>}}}
{{{<ifcount code="ca_storage_locations" min="2"><H6>Related storage locations:</H6></ifcount>}}}
{{{<unit relativeTo="ca_storage_locations" delimiter="<br/>"><l>^ca_storage_locations.preferred_labels.name</l></unit>}}}
{{{<ifcount code="ca_objects" min="1" max="1"><H6>Related object:</H6></ifcount>}}}
{{{<ifcount code="ca_objects" min="2"><H6>Related objects:</H6></ifcount>}}}
{{{<unit relativeTo="ca_objects" delimiter="<br/>"><l>^ca_objects.preferred_labels.name</l></unit>}}}
{{{<ifcount code="ca_places" min="1" max="1"><H6>Related place:</H6></ifcount>}}}
{{{<ifcount code="ca_places" min="2"><H6>Related places:</H6></ifcount>}}}
{{{<unit relativeTo="ca_places" delimiter="<br/>"><l>^ca_places.preferred_labels.name</l></unit>}}}
{{{<ifcount code="ca_objects" min="1">
<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_object_lots.idno_stub:^ca_object_lots.idno_stub'), 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>}}}
</div><!-- end col -->
</div><!-- end row -->
<div class="row">
<div class='col-md-6 col-lg-6'>
</div><!-- end col -->
<div class='col-md-6 col-lg-6'>
</div><!-- end col -->
</div><!-- end row -->
</div><!-- end container -->
</div><!-- end col -->
<div class='navLeftRight col-xs-1 col-sm-1 col-md-1 col-lg-1'>
<div class="detailNavBgRight">
{{{nextLink}}}
</div><!-- end detailNavBgLeft -->
</div><!-- end col -->
</div><!-- end row -->
Edit: I'm sorry 🤔 I wonder if I understand correctly when you write "detail page in the public search function". Which page exactly?