Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
## define $library_url below appropriately to your digital library url.
#set($library_url = "dlibra.psnc.pl")

<html>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
</head>
<body>
<TABLE border="1">
<tr>
<th>Tytuł publikacji</th>
<th>Link do publikacji</th>
<th>Identyfikator OAI</th>
</tr>
#foreach( $pub in $pubs )
	<tr>
	<td>$pub.getLabel()</td>
	<td><a href="http:/$library_url/publication/$pub.getId()">http://$library_url/publication/$pub.getId()</a>
	<td>oai:$library_url:$pub.getId()</td>
#end
</body>
</html>

Jak pokazuje przykład, w szablonie można korzystać ze zmiennej $pubs, która jest listą obiektów opisujących publikacje należące do wybranej publikacji grupowej. Obiekty te udostępniają następujące metodyAs shown in the template, variable $pubs can be used in it. The variable is a list of objects which describe the publications in the selected group publication. The following methods are made available by the objects:

  • getId() zwraca identyfikator publikacji– returns the publication identifier;
  • getLabel() zwraca nazwę publikacji (widoczną w aplikacji redaktora, niezwiązaną bezpośrednio z wartościami widocznymi dla czytelnika) – returns the name of the publication (visible in the Editor Application, not directly related to the values visible to the reader).