Map the bound-with relationship in schema.org
authorDan Scott <dscott@laurentian.ca>
Tue, 20 Aug 2013 16:45:44 +0000 (12:45 -0400)
committerDan Scott <dscott@laurentian.ca>
Sun, 25 Aug 2013 04:40:59 +0000 (00:40 -0400)
We don't know what type the target record is, so fall back to Product
and just point at it. At least this way schema.org processors will know
that the target bib is related to the current bib.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates/opac/parts/record/copy_table.tt2

index 57d1d41..b275c9f 100644 (file)
@@ -203,8 +203,14 @@ END; # FOREACH bib
     FOREACH bib IN copy_info.peer_bib_marc;
         attrs = {marc_xml => bib};
         PROCESS get_marc_attrs args=attrs %]
-[%- IF attrs.bibid != ctx.bre_id; %]
-    <li><a href="[% mkurl(ctx.opac_root _ '/record/' _ attrs.bibid) %]">[% attrs.title | html %] / [% attrs.author | html %]</a></li>
+[%- IF attrs.bibid != ctx.bre_id; -%]
+    <li property="isRelatedTo" typeof="Product">
+        [%- # Map the bound-with relationship -%]
+        <a href="[% mkurl(ctx.opac_root _ '/record/' _ attrs.bibid) %]" property="url">
+            <span class="bib_peer_title" property="name">[% attrs.title | html %]</span>
+            / <span class="bib_peer_author">[% attrs.author | html %]</span>
+        </a>
+    </li>
 [%- END; # IF attrs.bibid %]
 [%- END; # FOREACH bib in copy_info.peer_bib_marc
 '</ul>';