Skip to content

Commit 48430b6

Browse files
committed
Add dcterms:isPartOf useful for getting the system URL from a book's RDF
1 parent 38a799a commit 48430b6

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

system/application/config/rdf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
'has_version' => 'dcterms:hasVersion',
6363
'version_of' => 'dcterms:isVersionOf',
6464
'has_part' => 'dcterms:hasPart',
65+
'is_part_of' => 'dcterms:isPartOf',
6566
'references' => 'dcterms:references',
6667
'has_reference' => 'dcterms:isReferencedBy',
6768
'replaces' => 'dcterms:replaces',

system/application/models/book_model.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public function rdf($row, $base_uri='') {
7070

7171
if (!isset($row->type) || empty($row->type)) $row->type = 'book';
7272
if (isset($row->subtitle) && !empty($row->subtitle)) $row->title = $row->title.'<span class="subtitle">: '.$row->subtitle.'</span>';
73+
if (!isset($row->is_part_of)) $row->is_part_of = base_url();
7374
return parent::rdf($row, $base_uri);
7475

7576
}

0 commit comments

Comments
 (0)