Editing Resource Panels to Display Record Fields

The resource panels are pop-up windows that display resource links.

To customize the resource panel that displays in response to a request from the Encore/WebPAC, edit the wp_panel.html file.

To display license and resource record fields in response to a request from the Encore/WebPAC, edit the wp_resource.html file.

You can customize which fields from the resource and license records display by using fieldspec tokens in the wp_resource.html and resserv_resource.html files.

NOTE

Do not put spaces in front of fieldspec tokens.

The following are the record types that can be selected in a fieldspec token:

For variable-length fields, a fieldspec token format is:

<!--{fieldspec:[FieldType][RecordType][FieldTag]}-->

For example, if your resource advisory field is a variable-length, k-tagged field in your resource record, the fieldspec token to display that advisory would be:

<!--{fieldspec:Vek}-->

For fixed-length fields, the fieldspec token format is:

<!--{fieldspec:[FieldType][RecordType][FieldNumber]}-->

For example, if your Disability compliance information for a resource is stored in field 222 of your license record, the fieldspec token to display that advisory would be:

<!--{fieldspec:Fl222}-->

To display field labels or formatting only when there is data in the fields, use if/else statements for each of the specified fields. For example:

<!--{iffieldspec:Vlt}-->
Terms of Use:
<span class="license">
<!--{fieldspec:Vlt}-->
</span>
<!--{xif}-->

Special if / else logic tokens that can be utilized are:

The following snippet provides an example of how to combine the coverage- and ERM-related tokens in a single file. (Note that the css classes given are just examples -- no such classes are declared anywhere in the default stylesheet.)

<p class="linkdisplay">
<!--{linkdisplay}-->
</p>
<p class="coverage">
<!--{ifcoveragedate}-->
<!--{coveragedate}-->
<!--{xif}-->
</p>
<!--{ifhaserm}-->
<!--{iffieldspec:Vek}-->
<p class="advisory">
<!--{fieldspec:Vek}-->
</p>
<!--{xif}-->
<!--{ifhaslicense}-->
<!--{iffieldspec:Vlt}-->
<p class="resourceinfo">
Terms of Use: <span class="license">
<!--{fieldspec:Vlt}-->
</span>
</p>
<!--{xif}-->
<!--{iffieldspec:Fl222}-->
<p class="resourceinfo">
ADA compliance: <span class="ada">
<!--{fieldspec:Fl222}-->
</span>
</p>
<!--{xif}-->
<!--{xif}-->
<!--{xif}-->