Linking to records

From refbase

(Difference between revisions)
Revision as of 18:09, 15 January 2006
Matthias (Talk | contribs)
provided initial page content (info about permanent links and 'Show All' links)
← Previous diff
Revision as of 18:36, 15 January 2006
Matthias (Talk | contribs)
added info on how to link to a fixed list of records
Next diff →
Line 20: Line 20:
[http://polaris.ipoe.uni-kiel.de/refs/show.php?records=all show.php?records=all] [http://polaris.ipoe.uni-kiel.de/refs/show.php?records=all show.php?records=all]
 +
 +=== 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:
 +
 + show.php?serial=^(xxx|xxx|...|xxx)$
 +
 +where <code>xxx</code> is again the record's serial number. Basically, the value passed to the ''serial'' parameter starts with a caret sign ('<code>^</code>') and an opening parenthesis('<code>(</code>'), then a list of record serials delimited by a pipe character ('<code>|</code>') and ends with a closing parenthesis ('<code>)</code>') and a dollar sign ('<code>$</code>'). Here's an example for records with serial numbers '1', '12', '437' and '21234':
 +
 + [http://polaris.ipoe.uni-kiel.de/refs/show.php?serial=%5E(1%7C12%7C437%7C21234)$ show.php?serial=^(1|12|437|21234)$]
 +
[[Category:Usage]] [[Category:Usage]]

Revision as of 18:36, 15 January 2006

This pages 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 the refbase CVS version and may not be present in refbase-0.8.0.

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:

show.php?record=xxx

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:

show.php?record=12

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

show.php?records=all

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:

show.php?serial=^(xxx|xxx|...|xxx)$

where xxx is again the record's serial number. Basically, the value passed to the serial parameter starts with a caret sign ('^') and an opening parenthesis('('), then a list of record serials delimited by a pipe character ('|') and ends with a closing parenthesis (')') and a dollar sign ('$'). Here's an example for records with serial numbers '1', '12', '437' and '21234':

show.php?serial=^(1|12|437|21234)$