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.

Excluding media sub-element of a container when creating displays

Is it possible to exclude a sub-element of a container metadata when creating displays?

As a background, I have a container metadata for "Condition Reports" and one of its sub-elements is a media data type where we could upload and view a a complete softcopy of the condition report. As I was creating its display, I noticed that the media sub-element is still being seen in the display, even if I unchecked the 'Can be used in display' setting for it.

So far my display template goes something like this:

<unit><ifdef code="ca_objects.condition_incoming.condition_status"><b>Condition status:</b> ^ca_objects.condition_incoming.condition_status<br/></ifdef><ifdef code="ca_objects.condition_incoming.conservation_priority"><b>Conservation priority:</b> ^ca_objects.condition_incoming.conservation_priority<br/></ifdef></unit>

Is there something I could code so that the media sub-element won't be in the display anymore?

Thank you
775 x 452 - 61K

Comments

  • Are you making the whole display relativeTo the condition_incoming container?
  • edited September 22
    Hello Julia,

    Sorry for the delayed response. Yes, I'm trying to create a display relative to the condition_incoming container. I have since edited my code to:

    <unit
    relativeTo="ca_objects.condition_incoming"><br/>
    <ifdef
    code="ca_objects.condition_incoming.dateexamined2"><b>Date
    Examined:</b>
    ^ca_objects.condition_incoming.dateexamined2<br/></ifdef>
    <ifdef
    code="ca_objects.condition_incoming.condition_status"><b>Condition
    status:</b>
    ^ca_objects.condition_incoming.condition_status<br/></ifdef>
    <ifdef
    code="ca_objects.condition_incoming.conservation_priority"><b>Conservation
    priority:</b> ^ca_objects.condition_incoming.conservation_priority<br/></ifdef>
    <ifdef
    code="ca_objects.condition_incoming.recommendation"><b>Recommendation:</b>
    ^ca_objects.condition_incoming.recommendation<br/></ifdef>
    <ifdef
    code="ca_objects.condition_incoming.suggested_treatment"><b>Suggested
    treatment/notes:</b> ^ca_objects.condition_incoming.suggested_treatment<br/></ifdef>
    <ifdef
    code="ca_objects.condition_incoming.examinedby"><b>Examined
    by:</b> ^ca_objects.condition_incoming.examinedby
    (^ca_objects.condition_incoming.examinedesignation)<br/></ifdef>
    <ifdef
    code="ca_objects.condition_incoming.notedentity"><b>Noted
    by:</b> ^ca_objects.condition_incoming.notedentity
    (^ca_objects.condition_incoming.noteddesignation)<br/></ifdef>
    <ifdef
    code="ca_objects.condition_incoming.relatedevent"><b>Related
    event:</b> ^ca_objects.condition_incoming.relatedevent<br/></ifdef></unit>


    The 'Media' sub-element is still being displayed even if I didn't define it above, and did not enable Can be used in display.

    I also noticed that the 'Occurrences' and 'Entities' sub-elements are not being displayed.

    Thank you


    image
  • What version are you running?

    Try enabling "debugging" in setup.php and using the display template tester that appears on the Summary screen. What is output for your displays?
  • We're running 1.7.5, and is on the cloud (Whirl-i-Gig)

    Right now the code displays the attached image when viewing an artwork's summary. 

    Thanks!
    789 x 495 - 75K
  • Hi there, what do you mean is on the cloud (Whirl-i-Gig)? The debugging output will help you troubleshoot the template. Can you turn that on? A tester will appear on the Summary page.
  • Hello Julia. We availed of Whirl-i-Gig hosting services/subscription. From our end, we do not have access to the setup.php. Is there an another way to enable debugging from the web-based UI? Thank you
  • Hi mars, can you email me at hosting@collectiveaccess.org? I can turn it on for you.
  • Hello Julia,

    Thanks for enabling "debugging." I tried to test my code line per line and can confirm that the media is being displayed even without a code for it:

    imageimage
    image

    I was able to successfully display 'Entities' and 'Occurrences' sub-elements by removing their 'ifdef' tags:

    image
    My question now is if it is possible to not display the 'Media' sub-element of a container?

    Thank you!
  • I tested this on our dev server and it appears to be a bug. Could you please make a JIRA for the issue? clangers.collectiveaccess.org/jira
  • Hello Julia,

    I just created a JIRA for the issue: http://clangers.collectiveaccess.org/jira/browse/PROV-2249.

    May I confirm though if the <ifdef> tag are not applicable to 'Entities' and 'Occurrences' sub-elements?

    Thank you.
  • <ifdef> can be used for any table in CollectiveAccess. The issue is independent of the ifdef tags, though.
Sign In or Register to comment.