CompoundObjectMetadata
From CONTENTdm Users Wiki
This is the University of Iowa's cusomtization to display both page and document metadata below compound object images. This code dates back to November 2006, and predates upgrades beyond CONTENTdm 4.0, so anybody using this code should be aware of this. As of fall 2008 in version 4.3, this customization has had the effect of excessive white space and too many scroll bars.
Here is an example of how this customization appears:
http://digital.lib.uiowa.edu/u?/maps,1129
All the information below comes from another staff member at our institution. Overall, I'm not that familiar with coding PHP.
Generally speaking, we're now inserting
meta_viewer.php as another iframe below the object viewer. More
specifically, here are the details....
To get the page-level metadata, we modified viewer.php to append meta_scr.php to the object viewer:
<br>
<center><span class="maintext"><b>Page Description</b></span></center>
<table cellpadding="2" cellspacing="0" border="0" width="100%"
style="border: <?=S_RESULTS_BORDER?>px solid <?=S_RESULTS_BORDER_BG?>"
bgcolor="<?=S_PAGE_BG?>">
<? include(INCLUDE_PATH."meta_scr.php"); ?>
</table>
Then, we modified document.php to add another inline frame for the document metadata:
<br>
<span class="maintext"><b>Document Description</b></span><br>
<script language = "javascript">
<!--
document.write('<iframe id="rightDocDescription"
name="rightDocDescription"
width="'+(getBrowserWidth()-(deductwidth+mw))+'px" height="480px"
src="blank.php" frameborder="0"><\/iframe>');
top.parent.rightDocDescription.location.href =
'meta_viewer.php?CISOROOT='+(TopCisoRoot())+'&CISOPTR='+(TopCisOptr())+'
&VIEW=docdesc';
//-->
</script>
This caused the usual iframe problem of too many scrollbars, so we added some JavaScript that would dynamically resize the iframes based on code from here:
http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm
We simply configured the script according to Dynamic Drive's instructions so that it would monitor these two iframes:
var iframeids=["right", "rightDocDescription"]
And then we had to add the id attribute to the pre-existing image displayer iframe:
document.write('<iframe id="right" name="right"
width="'+(getBrowserWidth()-(deductwidth+mw))+'px"
height="'+(getBrowserHeight()+23)+'px" src="blank.php"
frameborder="0"><\/iframe>');
Mark Anderson
University of Iowa Libraries.

