Linking to records

From refbase

This page shows how to provide links to particular records or search result sets and how to control the database output:

Important: Please note that the features described below refer to refbase-0.9.0 or greater and may not be present in earlier versions.

The given links are all working examples which you can try out.


Permanent record links

If you display a record in details view, you'll notice a link below each record saying "Permanent link to this record". You can copy this URL to directly link to a particular record. The URL looks like this:


where xxx is the serial number of the record that's displayed in the record's serial field. E.g., to link to a record with serial number '12', use:


Displaying all records in a database

If you want to give someone a link that simply displays all records in the database, you can use


Linking to a fixed list of records

In order to provide a link that points someone to a fixed list of records in your database, you can use:


where xxx is again the record's serial number. You may use any non-digit character(s) to delimit between multiple serial numbers. Here's an example for records with serial numbers '1', '12', '437' and '21234':


Displaying records of a particular author

You can use the show.php script in conjunction with the author parameter to build a link that points to all records of a particular author. E.g., here's a link that shows all records where the author field contains 'mock':


Note that, in this example, there are some duplicate record entries. If these duplicates have been flagged in the database, you can omit them by adding without=dups to your URL:


It's also possible to present only a subset of the author's records. E.g., this will display all unique records by 'Mock' that were published in year 2002:


Or, to give another example, this will display all unique records by 'Mock' whose title field contains 'photo':


Displaying records that contain a particular word

Besides the author, year and title fields, you can also query other fields such as keywords, abstract, area or the type field. As an example, the link below will display all records whose title contains 'plankton' and where the keywords field contains 'antarctic' and the abstract contains 'primary production':

show.php?title=plankton&keywords=antarctic&abstract=primary production

And here's another one which will show all records where the area field contains 'greenland' and the type field contains 'chapter':


Controlling the output of found results

The show.php script allows you to control how found records are displayed on screen. E.g., it's easy to change the number of records that are returned per page. Here's again one of the above examples which shows all unique records by 'Mock' but we'll instruct the database to return 10 records per page:


Same as above, but records are displayed in details view and with only one record per page:


And here's the same result set in cite view, showing 20 records per page:


Again, same as above, but this time in print view and without any links:


You can change the citation style and sort order. In this example, citations are formatted according to the citation style "J Glaciol" and are sorted by resource type:

show.php?author=mock&without=dups&showRows=20&submit=Cite&citeStyle=J Glaciol&citeOrder=type

You can also output citations as RTF, PDF, LaTeX or structured/plain text:

show.php?author=mock&without=dups&showRows=20&submit=Cite&citeStyle=J Glaciol&citeOrder=type&citeType=RTF
show.php?author=mock&without=dups&showRows=20&submit=Cite&citeStyle=J Glaciol&citeOrder=type&citeType=PDF
show.php?author=mock&without=dups&showRows=20&submit=Cite&citeStyle=J Glaciol&citeOrder=type&citeType=LaTeX
show.php?author=mock&without=dups&showRows=20&submit=Cite&citeStyle=J Glaciol&citeOrder=type&citeType=Markdown
show.php?author=mock&without=dups&showRows=20&submit=Cite&citeStyle=J Glaciol&citeOrder=type&citeType=ASCII

You can even provide links that directly return all search results in export formats such as Endnote, RIS, BibTeX or XML:

show.php?author=mock&without=dups&submit=Export&exportFormat=ODF XML&exportType=xml
show.php?author=mock&without=dups&submit=Export&exportFormat=MODS XML&exportType=xml
show.php?author=mock&without=dups&showRows=20&submit=Export&exportFormat=SRW XML&exportType=xml

Same records returned as a file download:

show.php?author=mock&without=dups&submit=Export&exportFormat=ODF XML&exportType=file
show.php?author=mock&without=dups&submit=Export&exportFormat=MODS XML&exportType=file
show.php?author=mock&without=dups&showRows=20&submit=Export&exportFormat=SRW XML&exportType=file