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.

What do I need to do to browse/filter/select using hierarchy of object types in Pawtucket?

edited April 2016 in Pawtucket

I'm using Providence 1.6.1 and Pawtucket 2

Within my Providence installation profile, I've built an object type hierarchy using the syntax below:

    <list code="object_types" hierarchical="1" system="0" vocabulary="1">
      <labels>
        <label locale="en_US">
          <name>Object Types</name>
        </label>
      </labels>
      <items>
        <item idno="image_media" enabled="1" default="1" access="1" status="4">
          <labels>
            <label locale="en_US" preferred="1">
              <name_singular>Image/Media</name_singular>
              <name_plural>Images/Media</name_plural>
            </label>
          </labels>
          <items>
            <item idno="photograph_print" enabled="1" default="1" access="1" status="4">
              <labels>
                <label locale="en_US" preferred="1">
                  <name_singular>Photograph (Print)</name_singular>
                  <name_plural>Photographs (Prints)</name_plural>
                </label>
              </labels>
            </item>
            <item idno="photograph_negative" enabled="1" default="0" access="1" status="4">
              <labels>
                <label locale="en_US" preferred="1">
                  <name_singular>Photograph (Negative)</name_singular>
                  <name_plural>Photographs (Negatives)</name_plural>
                </label>
              </labels>
            </item>
            <item idno="photograph_slide" enabled="1" default="0" access="1" status="4">
              <labels>
                <label locale="en_US" preferred="1">
                  <name_singular>Photograph (Slide)</name_singular>
                  <name_plural>Photographs (Slides)</name_plural>
                </label>
              </labels>
            </item>
          </items>
        </item>

In the above example "photograph_print", "photograph_negative" and "photograph_slide" are all object sub types within the category of "image_media", another object type. I can certainly see this creates a representation of hierarchy on the "New Object" drop down list within Providence though I'm not sure if a true hierarchical linking is made between them all.

In Pawtucket I have a theme based loosely on the default theme and when I do a "Browse by > Object types" I see just a flat list of object types which are all from the lower level of the hierarchy - the higher levels don't get shown. What I want to achieve is a hierarchical selection so that the user initially sees just the top levels of object type but can then progressively drop down, e.g. selecting "image_media" would make the lower levels visible so that the user could select one or more of them. Equally I'd want the user to be able to select the higher level to get all object types below it.

I couldn't find any example themes that demonstrate this and I'm not quite where to start to add this so I'd appreciate any hints on where and how this functionality needs to be implemented.

Thanks

Andy

Comments

  • Hi Andy,

    You can do this by setting your group_mode setting for the type facet to "hierarchical."
  • Hi Sophie

    I tried that, editing browse.conf as below:

      type_facet = {
       type = fieldList,
       field = type_id,
       
       group_mode = hierarchical
    ,

       label_singular = _("object type"),
       label_plural = _("object types"),
       description = _("Find objects according to the Types defined in your collection profile."),
      }, 

    but it now seems to show an error, and lists nothing when object types is selected, see attached image.

    Thanks

    Andy

  • I thought group_mode = hierarchical is only supported if the facet type = authority? In my case the facet type = fieldList as I'm browsing object types. Is there another option to make this work?
  • If you are using Pawtucket2, then lists can be displayed hierarchically in browse.  Have you pulled the latest front-end code?
  • Thanks Sophie. I pulled the Pawtucket2 'master' code from around six weeks back - should I be using the 'develop' branch? I was looking at the documentation below which mentions the limitation around group_mode = hierarchical being only good if the facet type is 'authority'.

    http://docs.collectiveaccess.org/wiki/Browse_Configuration

    Assuming I use the right code, does the type_facet in my example above look OK?

    Thanks

    Andy

  • edited January 5
    I've just been looking at this again with Providence 1.7.5 and the latest Pawtucket 2 and the object type hierarchical browsing still doesn't seem to work as expected, i.e. showing the highest level object type and then progressively showing the lower level object sub types. This is what I have in the Pawtucket theme browse.conf file:

    type_facet = {
    type = authority,
    field = type_id,
    group_mode = hierarchical,
    label_singular = _("object type"),
    label_plural = _("object types"),
    description = _("Find objects according to the Types defined in your collection profile."),
    },

    How do I get the object type/sub_type to browse hierarchically? Am I correct to use type=authority and group_mode=hierarchical? Is it necessary to do any re-indexing?

    Thanks

    Andy
  • I still can't get the hierarchical object type browsing to work. All types and sub types are shown at a single flat level. Does anyone have any ideas of what I might need to do?

    Thanks

    Andy

  • Still no success with this, does anyone know what I need to do?
  • I still don't know what I'm missing. Can anybody help please?
    Thanks
    Andy
  • Hi Berney,

    Object types are not an authority, your browse setting should be type = fieldList
  • edited February 8
    Hi Sophie. I tried that already, see my second post above, i.e.:

        type_facet = {
            type = fieldList,
             field = type_id,
             group_mode = none,
             label_singular = _("object type"),
             label_plural = _("object types"),
        description = _("Find objects according to the Types defined in your collection profile."),

    However that doesn't allow hierarchical browsing of the object types/sub-types.

    If I change to "group_mode = hierarchical" as you suggested above then I just get a blank panel, no objects types shown. As mentioned above I thought "group_mode = hierarchical" is only supported if the facet type = authority? Can you confirm?

    So I'm back to the original problem - how do I display the hierarchy of object types on a browse?

    I'd really like to get this resolved.

    Thanks

    Andy
  • Did you have a chance to review my latest post above Sophie?
    Thanks
    Andy
Sign In or Register to comment.