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.

LCSH cross references

edited October 2013 in Pawtucket
Is it currently possible to have LCSH cross reference other objects with the same LCSH?

Comments

  • You can browse for objects by LC subject headings. Is that what you mean?
  • I suppose that is basically what I mean. What I really want is for the LCSH to appear as a link in an object record that will take the user to a list of objects with the same subject heading.
  • I'm also working on that -- I'll let you know if I find a solution, please do the same.

    At the moment I'm trying to utilize either the internal CA linking tags <l> [not working!] and/or to implement a caNav link.
  • Ok, so what you want is a search that results in a list of objects with the same term? Are you looking for this on the front-end, back-end or both?
  • I was able to use the following code to generate each LCSH as a linked item on my Object Detail pages to produce this in Pawtucket [front-end]:

    # --- LCSH
    $va_lcsh = $t_object->get("ca_objects.lcsh_terms", array("returnAsArray" => 1, 'checkAccess' => $va_access_values));
    if(sizeof($va_lcsh) > 0){
    print "<div class='unit'><h2>"._t("Library of Congress Heading").((sizeof($va_lcsh) > 1) ? "s" : "")."</h2>";
    foreach($va_lcsh as $va_lcsh_info){
    print "<div>".caNavLink($this->request, $va_lcsh_info['lcsh_terms'], '', '', 'Search', 'Index', array('search' => 'ca_objects.lcsh_terms:"'.trim($va_lcsh_info['lcsh_terms']).'"'))."</div>";

    }
  • This is my code for that same option; however, with ca 1.4 it is no longer working. I now get a 404 error file not found at the server level.

    # --- LCSH
                $va_lcsh = $t_object->get("ca_objects.lcsh_terms", array("returnAsArray" => 1, 'checkAccess' => $va_access_values));
                if(sizeof($va_lcsh) > 0){
                    print "<div class='unit'><h2>"._t("Library of Congress Heading").((sizeof($va_lcsh) > 1) ? "s" : "")."</h2>";
                    foreach($va_lcsh as $va_lcsh_info){
                        print "<div>".caNavLink($this->request, $va_lcsh_info['lcsh_terms'], '', '', 'Search', 'Index', array('search' => 'ca_objects.lcsh_terms:"'.trim($va_lcsh_info['lcsh_terms']).'"'))."</div>";
            }
                print "</div><!-- end unit -->";
                }
  • Try dumping $va_lcsh_info to see if the format is the same as it was before. Also, the controller names may have changed in Pawtucket v1.4.
  • the dump returned fine. It seems like I need to trim off the subject heading number (sh###) that displays at the end. 
  • # --- LCSH- This seems to work
    $va_lcsh = $t_object->get("ca_objects.lcsh_terms", array('returnAsArray' => 1, 'returnAllLocales' => false));
    if(sizeof($va_lcsh) > 0){
    print "<div class='unit'><h2>"._t("Library of Congress Heading").((sizeof($va_lcsh) > 1) ? "s" : "")."</h2>";
    foreach($va_lcsh as $va_lcsh_info){
    $lcsh_term=explode(" [",$va_lcsh_info['lcsh_terms']);
    print "<div>".caNavLink($this->request, $lcsh_term[0], '', '', 'Search', 'Index', array('search' => 'ca_objects.lcsh_terms:"'.trim($lcsh_term['0']).'"'))."</div>";
    }
    print "</div><!-- end unit -->";
    }
Sign In or Register to comment.