Skip to main content
ExLibris

Knowledge Assistant

BETA
 
  • Subscribe by RSS
  • Back
    Primo

     

    Ex Libris Knowledge Center
    1. Search site
      Go back to previous article
      1. Sign in
        • Sign in
        • Forgot password
    1. Home
    2. Primo
    3. Community Knowledge
    4. Improving the 505 Table of Contents display

    Improving the 505 Table of Contents display

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    No headers
    Created By: Lesli Moore
    Created on: 10/21/2021



    We have a variety of basic and enhanced formatted table of contents in the 505. With help from Ex Libris Support and Jesse Kruppa, we are now using the following rules for Contents.

    rule "Primo VE - contents 505gtr"
    #creates list style TOC
    #if the record has 505 with subfield g, t, or r
    #copy the g, t, r subfields in that order to a temp field and wrap in prefix & suffix placeholders
    #replace the delimiter in subfield g with prefix & suffix with html bold
    #replace the delimiter in subfield t with prefix & suffix with html italic
    #replace the delimiter in subfield r with html line break
    #repeat for each new heading in subfield g
    #replace any occurrence of double hyphen with blank
    #create the contents display in the PNX from the temp field
    when
                MARC."505" has any "g,t,r"
    then
                set TEMP"1" to MARC."505" sub without sort "g,t,r" wrap subfields
                replace wrapping delimiters (TEMP"1","g","<b>","</b><br>")
                replace wrapping delimiters (TEMP"1","t","<span>&bull;</span> <i>","</i>")
                replace wrapping delimiters (TEMP"1","r","","<br><br>")
                replace string by string (TEMP"1","--","")
                create pnx."display"."contents" with TEMP"1"
    end

    rule "Primo VE - contents 505a"
    #creates list style TOC
    #if the record has 505 with subfield a
    #copy the subfield a to temp field
    #replace any occurrence of double hyphen with <span>&bull;</span> html
    #primoVE doesn't support <li> tags
    #add <span>&bull;</span> html to start of temp field
    #space is added after the </span> tags for readability
    #create the contents display in the PNX from the temp field
    when
                MARC is "505"."a"
    then
                set TEMP"1" to MARC."505" sub without sort "a"
                replace string by string (TEMP"1","(--|;)","<br><span>&bull;</span> ")
                add prefix (TEMP"1","<span>&bull;</span> ")
                create pnx."display"."contents" with TEMP"1"
    end

     

     screenshot of 505 display and marc record

    screenshot of 505 display and marc record

     




    Report
    View article in the Exlibris Knowledge Center
    1. Back to top
      • How to remove records from deduplilcation
      • Analytics Evidence PG10 - Report on Any Primo Interface Actions
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Community Content Type
      How To
      Product
      Primo
    2. Tags
      This page has no tags.
    1. © Copyright 2025 Ex Libris Knowledge Center
    2. Powered by CXone Expert ®
    • Term of Use
    • Privacy Policy
    • Contact Us
    2025 Ex Libris. All rights reserved