Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

Help with adding attributes to display on detail pages

Hi,


I'm having trouble trying to work out how I
control how attributes are displayed on detailed pages in Pawtucket (currently using Pawtucket2 and Providence 1.7.6). I've used display templates in Providence for displays and metadata bundle displays but I’m not sure how I can display the data in the same or similar way in Pawtucket. I haven't made any changes to the Pawtucket configuration files yet as I wanted to make sure I knew what I was doing before I start. I'm still relatively new to writing in code so any help will be appreciated.

My main issues are:

1) I need to configure detailed displays in Pawtucket for different ca_objects types. The system I'm currently working on has catalogue records for both archives and library materials. I have object types called 'records' and 'recordcomponent' which need to be displayed following ISAD(G) standard and 'rdac:10007' and 'rdac:C10003' which need to be displayed following ISBD standard. In Providence I've have two separate display templates which follow the standards, but I'm not sure how I can do the same in Pawtucket.

2) I want to be able to control how the attribute data is displayed in Pawtucket. Is this possible to do this? I’ve only configured
display formats through the user interface of Providence and here is an example of one of the more complicated ones:

<unit relativeTo="ca_objects.publicationStatement">
    <ifdef code="ca_objects.publicationStatement.placeOfPublication"> ^ca_objects.publicationStatement.placeOfPublication</ifdef>
    <ifdef code="ca_objects.productionStatement.placeOfProduction">^ca_objects.productionStatement.placeOfProduction</ifdef>
    <ifdef code="ca_objects.distributionStatement.placeOfDistribution">^ca_objects. distributionStatement.placeOfDistribution</ifdef>
    <ifdef code="ca_objects.publicationStatement.publishersName"> : ^ca_objects.publicationStatement.publishersName</ifdef>
    <ifdef code="ca_objects.productionStatement.producersName"> : ^ca_objects.productionStatement.producersName</ifdef>
    <ifdef code="ca_objects.distributionStatement.distributorsName"> : ^ca_objects.distributionStatement.distributorsName</ifdef>
    <ifdef code="ca_objects.publicationStatement.dateOfPublication">, ^ca_objects.publicationStatement.dateOfPublication</ifdef>
    <ifdef code="ca_objects.productionStatement.dateOfProduction">, ^ca_objects.productionStatement.dateOfProduction</ifdef>
    <ifdef code="ca_objects.distributionStatement.dateOfDistribution">, ^ca_objects.distributionStatement.dateOfDistribution</ifdef>
    <ifdef code="ca_objects.ManufactureStatement.manufacturedate">, ^ca_objects.ManufactureStatement.manufacturedate</ifdef>
    <ifdef code="ca_objects.ManufactureStatement.manufeactureplace"> (^ca_objects.ManufactureStatement.manufeactureplace
        <ifdef code="ca_objects.ManufactureStatement.manfacturename">, ^ca_objects.ManufactureStatement.manfacturename</ifdef>)
    </ifdef>
</unit>

Is there a way to display this data the same way in Pawtucket?

Comments

  • Hi Katie,

    The Display templates will work the same in Pawtucket2 as in Providence, provided that you wrap the templates in enclosing triple brackets {{{}}}. The standard detail pages in the default theme have some good examples of how this works for Pawtucket. You can just open any of the detail pages and replace the standard attributes with your display templates. If you don't want to change the layout of the page at all just look for the those brackets and replace the content.

    For displaying those different object types Pawtucket2 you have to do two things:

    1) Create copies of the standard ca_objects_default_html.php page in the views/Details directory of your theme. Rename them to ca_objects_[OBJECT_TYPE]_html.php obviously replacing OBJECT_TYPE with the type codes in your system.

    2) Edit the detail.conf files in your theme, replacing the standard object detail type with unique entries for each of your object types. Be sure to set restrictToTypes so that each is restricted to the proper object types
  • Thanks.

    So, if I have a ca_objects_record_html.php in my view/details directory of my theme, I need to edit the detail.conf file

    detailTypes = {
        objects_record = {
            displayName = _(Objects),
            table = ca_objects,
            restrictToTypes = [record],
    etc.

    and add unique entries for each of  other types of object records I want to display? Or do I have to edit another part of the detail.conf file?

  • No, that is the only step that you need. 

    One correction: instead of using "objects_record" in the conf file it should just be "record". As you have it now the system won't pick up your additional configuration and not load the new detail page.

    -Mike
Sign In or Register to comment.