TPAC schema.org: Add Organization types for contributors
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / record / authors.tt2
index 94a887b..7205e8f 100644 (file)
@@ -69,11 +69,17 @@ BLOCK build_author_links;
         IF type == 'author';
             IF args.schema.itemtype && args.schema.itemtype.match('MusicAlbum');
                 iprop = ' itemtype="http://schema.org/MusicGroup" itemscope itemprop="byArtist"';
-            ELSE;
+            ELSIF tag.substr(1,2) == '00';
                 iprop = ' itemtype="http://schema.org/Person" itemscope itemprop="author"';
+            ELSE;
+                iprop = ' itemtype="http://schema.org/Organization" itemscope itemprop="author"';
             END;
         ELSIF type == 'added';
-            iprop = ' itemprop="contributor"';
+            IF tag.substr(1,2) == '00';
+                iprop = ' itemtype="http://schema.org/Person" itemscope itemprop="contributor"';
+            ELSE;
+                iprop = ' itemtype="http://schema.org/Organization" itemscope itemprop="contributor"';
+            END;
         END;
         '<a href="' _ url _ '"' _ iprop _ '>';
         IF iprop; '<span itemprop="name">'; END;