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.

Object detail page information searchable

Our question is about Pawtucket2 with Collective Access version 1.6 (schema version 125).
On object detail page we want some of the object information to be searchable. That is, for some fields, when users click on their values a search is executed on a field( or full text search is performed).
For example, as shown in the attached image, when user clicks on the ‘BAV (Biblioteca Apostolica Vaticana, Rome)’  value of the ‘Library’ field, user should get search result on field Library on all objects in the database.
Similarly, in other cases for some other fields we need to get results from a full text search.

We can add or remove object fields to populate the object detail page in ‘\views\Details\ca_objects_default_html.php’ file by using display bundles, for example:
{{{<ifdef code="ca_objects.marc852.marc852a"><H6>Library:</H6>^ca_objects.marc852.marc852a<br/></ifdef>}}}

However, we could not find any way to add hyperlinks to the values of those fields (which we want to make searchable) that may allow users to click and see search results.

Any solution to this problem?



  • You could construct a link in the template using HTML and the ^ca_objects.whatever tag. 
  • Will that link perform search on that field and display results?
  • It'll search on whatever you want if it's a link to the search controller.
  • Could you please exemplify a link via template for field '^ca_objects.marc210a'? We want link for this field to search all objects for a particular value.
  • This would be something like {{{<a href="[relative path]/Search/objects?search=^ca_objects.marc210a">^ca_objects.marc210a</a>}}}
  • michaelb. It indeed is a solution for one of the problem. Is there any documentation available to understand the syntax of such links, maybe i overlooked it in the Collective Access documentation?

    We want to make more specific searches, for example search only on title, or idno, or any other field, so that value is searched in only a particular field. What information we need to add in the example you mentioned to achieve this?
  • You can be more specific in your search by using the CA Search Syntax.

    In this case, so the search portion of the code I posted above would be "search=ca_objects.idno:[search_term]" to limit your search to idno.

  • edited November 2016

    If you want to load any additional stylesheets or javascript for your theme, you'll need to  specify them in assets.conf (note that new graphics in your graphics folder are excluded from this requirement). For example, if you want to load a js file, you would create a new folder in your assets directory and upload it there. Let's say you've created mytheme/assets/pawtucket/js/slider.js. Your assets.conf file needs to be edited to reflect the new file in both themePackages and themLoadSets as follows:

    themePackages = {
    # -----------------------
    pawtucket = {
    css = css/main.css:100,
    fonts = css/fonts.css,
    fontAwesome = css/Font-Awesome/css/font-awesome.css,
    themecss = css/theme.css:200,
    myjs = js/slider.js
    # -----------------------

    themeLoadSets = {
    # Libraries listed in "_default" are always loaded (whether or not they have been
    # registered in code to load), are loaded in the order listed and are always
    # loaded first
    _default = [
    pawtucket/css, pawtucket/fonts, pawtucket/fontAwesome, pawtucket/themecss, pawtucket/myjs

    Your new assets now loads with your theme.

Sign In or Register to comment.