[Archon-L] Modifying Location output
Chris Prom
prom at uiuc.edu
Tue Jun 5 08:32:17 MDT 2007
On Thu, 31 May 2007, Don Thompson wrote:
Our Special Collections department would like to have the
Content Field (from the locationindex table) displayed when a
public patron does a search. Can you give me some guidance in
accomplishing this?
Thanks
Don
----------
Don,
However, it should be farily easy to show the locations in the
public output.
In the file controlcard.inc.php for the template set you are
using, you'll need to edit the php and html so that the file does
something with the location information when the user in not
authenticated. Basically, you need to reference a few variables.
To do this on our website, we put the "else" piece of code that
I've pased after my signature line into the file AFTER the "if"
that shows locations for logged-in users.
(You can see we do some testing on the LocationID numbers to
display different service locations or messages depending on
where the boxes are stored. You may not need to do that--if so,
just delete those sections--but if you do, you can edit the
statments to test on the values contained in tblCol_Locations.)
Chris
--
Christopher J. Prom
Assistant University Archivist
University of Illinois Archives
19 Library
1408 W. Gregory Dr.
Urbana, IL 61801
phone: 217.333.0798
fax: 217.333.2868
e-mail: prom at uiuc.edu
web: http://web.library.uiuc.edu/ahx
____________________
if($_ARCHON->Security->isAuthenticated())
{
// code that exectues if user is logged in to admin interface
}
else //user is
not authenticated
{
if(!empty($objCollection->LocationEntries))
{
?>
<tr>
<td width="150" valign="top"><b>Service Location(s):</b></td>
<td>
<table width="100%" border="1">
<tr>
<th>Boxes</th>
<th>Location</th>
<?php
foreach ($objCollection->LocationEntries as $loc)
{
?>
<tr>
<td><?php echo($loc->Content);?></td>
<?php
if ($loc->LocationID<5 || ($loc->LocationID>7 and
$loc->LocationID<22) )
{
?>
<td>Archives Research Center, 1707 S.
Orchard</td>
<?php
}
elseif ($loc->LocationID==23)
{
?>
<td>SACAM, Band Building</td>
<?php
}
elseif ($loc->LocationID>=27)
{
?>
<td>19 Library, 1408 W. Gregory
Drive</td>
<?php
}
else
{
?>
<td>Offsite: Prior notice required</td>
<?php
}
?>
</tr>
<?php
}
More information about the Archon
mailing list