Universal Viewer config.json

Greetings,

I’m trying to get the UV configured on this page. The one config/feature I really want is the two-page side-by-side view which I’ve seen on some other examples. My issue is, the omeka-s/themes/[theme]/asset/universal-viewer/config.json file only has these configurations:

{
“options”: {
“dropEnabled”: true,
“footerPanelEnabled”: true,
“headerPanelEnabled”: true,
“leftPanelEnabled”: false,
“limitLocales”: false,
“overrideFullScreen”: false,
“pagingEnabled”: true,
“rightPanelEnabled”: true
},
“modules”: {
“headerPanel”: {
“options”: {
“localeToggleEnabled”: false
}
},
“seadragonCenterPanel”: {
“options”: {
“autoHideControls”: false
}
}
}
}

Yet I’ve seen some forum posts indicating there were more possible configurations. Do these features require additional UV modules? Could I enable these? The documentation seems vague when it comes to this, am I missing something?

Regards,
Zach

Hi Zach,

I once found these options working for me.

Best Jan


{
“options”: {
“allowStealFocus”: false,
“bookmarkThumbHeight”: 150,
“bookmarkThumbWidth”: 90,
“dropEnabled”: false,
“footerPanelEnabled”: true,
“headerPanelEnabled”: true,
“leftPanelEnabled”: false,
“limitLocales”: false,
“multiSelectionMimeType”: “application/zip”,
“navigatorEnabled”: false,
“openTemplate”: “http://universalviewer.io?manifest={0}”,
“overrideFullScreen”: false,
“pagingEnabled”: false,
“pagingOptionEnabled”: false,
“pessimisticAccessControl”: false,
“preserveViewport”: false,
“rightPanelEnabled”: false,
“saveUserSettings”: false,
“clickToZoomEnabled”: true,
“searchWithinEnabled”: true,
“termsOfUseEnabled”: false,
“theme”: “uv-en-GB-theme”,
“tokenStorage”: “session”,
“useArrowKeysToNavigate”: false,
“zoomToSearchResultEnabled”: true
},
“modules”: {
“contentLeftPanel”: {
“options”: {
“defaultToTreeEnabled”: false,
“defaultToTreeIfGreaterThan”: 0,
“elideCount”: 40,
“expandFullEnabled”: false,
“galleryThumbChunkedResizingThreshold”: 400,
“galleryThumbHeight”: 320,
“galleryThumbLoadPadding”: 3,
“galleryThumbWidth”: 200,
“oneColThumbHeight”: 320,
“oneColThumbWidth”: 200,
“pageModeEnabled”: true,
“panelAnimationDuration”: 250,
“panelCollapsedWidth”: 30,
“panelExpandedWidth”: 255,
“panelOpen”: false,
“tabOrder”: “”,
“thumbsEnabled”: true,
“thumbsExtraHeight”: 8,
“thumbsImageFadeInDuration”: 300,
“thumbsLoadRange”: 15,
“treeEnabled”: true,
“twoColThumbHeight”: 150,
“twoColThumbWidth”: 90
},
“content”: {
“collapse”: “Collapse Contents”,
“collapseFull”: “Collapse Gallery”,
“date”: “date”,
“expand”: “Expand Contents”,
“expandFull”: “Expand Gallery”,
“index”: “Index”,
“searchResult”: “{0} search result”,
“searchResults”: “{0} search results”,
“sortBy”: “Sort By:”,
“thumbnails”: “Thumbnails”,
“title”: “Contents”,
“volume”: “volume”
}
},
“dialogue”: {
“content”: {
“close”: “Close”
}
},
“downloadDialogue”: {
“options”: {
“confinedImageSize”: 1000,
“currentViewDisabledPercentage”: 90,
“maxImageWidth”: 5000,
“optionsExplanatoryTextEnabled”: false,
“selectionEnabled”: false
},
“content”: {
“currentViewAsJpg”: “Current view {0} x {1}px (jpg)”,
“currentViewAsJpgExplanation”: “Opens in a new window”,
“pagingNote”: “Please turn off Two Page View for additional options.”

  }
},
"footerPanel": {
  "options": {
    "bookmarkEnabled": false,
    "downloadEnabled": false,
    "embedEnabled": false,
    "feedbackEnabled": false,
    "fullscreenEnabled": true,
    "minimiseButtons": true,
    "moreInfoEnabled": false,
    "openEnabled": false,
    "printEnabled": false,
    "shareEnabled": false
  },
  "content": {
    "bookmark": "Add to bookmarks",
    "download": "Download",
    "embed": "Embed",
    "feedback": "Feedback",
    "exitFullScreen": "Exit Full Screen",
    "fullScreen": "Full Screen",
    "open": "Open",
    "share": "Share"
  }
},
"genericDialogue": {
  "content": {
    "emptyValue": "please enter a value.",
    "invalidNumber": "Please enter a valid number.",
    "noMatches": "No matches were found.",
    "ok": "OK",
    "pageNotFound": "This item does not contain a page with the number you entered. Try switching the numbering mode to 'image'.",
    "refresh": "Refresh"
  }
},
"headerPanel": {
  "options": {
    "localeToggleEnabled": false,
    "settingsButtonEnabled": false
  }
},
"helpDialogue": {
  "content": {
    "text": "placeholder text",
    "title": "Help"
  }
},
"moreInfoRightPanel": {
  "options": {
    "canvasDisplayOrder": "",
    "canvasExclude": "",
    "copyToClipboardEnabled": false,
    "manifestDisplayOrder": "",
    "manifestExclude": "",
    "panelAnimationDuration": 250,
    "panelCollapsedWidth": 30,
    "panelExpandedWidth": 255,
    "panelOpen": false,
    "rtlLanguageCodes": "ar, ara, dv, div, he, heb, ur, urd",
    "showAllLanguages": false,
    "textLimit": 4,
    "textLimitType": "lines"
  },
  "content": {
    "attribution": "Attribution",
    "collapse": "Collapse Information",
    "collapseFull": "Collapse Gallery",
    "description": "Description",
    "expand": "Expand Information",
    "expandFull": "Expand Gallery",
    "holdingText": "Your module goes here!",
    "less": "less",
    "license": "License",
    "logo": "Logo",
    "more": "more",
    "noData": "No data to display",
    "page": "Page",
    "title": "More Information",
    "manifestHeader": "About the item",
    "canvasHeader": "About the image",
    "copyToClipboard": "Copy to clipboard",
    "copiedToClipboard": "Copied to clipboard"
  }
},
"multiSelectDialogue": {
  "options": {
    "galleryThumbChunkedResizingEnabled": true,
    "galleryThumbChunkedResizingThreshold": 400,
    "galleryThumbHeight": 320,
    "galleryThumbLoadPadding": 3,
    "galleryThumbWidth": 200,
    "pageModeEnabled": false
  },
  "content": {
    "select": "Download",
    "selectAll": "Select All",
    "title": "Select Pages for Download"
  }
},
"pagingHeaderPanel": {
  "options": {
    "autoCompleteBoxEnabled": false,
    "galleryButtonEnabled": false,
    "imageSelectionBoxEnabled": false,
    "pageModeEnabled": false,
    "pagingToggleEnabled": false
  },
  "content": {
    "close": "Close",
    "emptyValue": "Please enter a value",
    "first": "First",
    "firstImage": "First Image",
    "firstPage": "First Page",
    "folio": "Folio",
    "gallery": "Gallery",
    "go": "Go",
    "help": "Help",
    "image": "Image",
    "last": "Last",
    "lastImage": "Last Image",
    "lastPage": "Last Page",
    "next": "Next",
    "nextImage": "Next Image",
    "nextPage": "Next Page",
    "of": "of {0}",
    "oneUp": "Single page view",
    "page": "Page",
    "previous": "Previous",
    "previousImage": "Previous Image",
    "previousPage": "Previous Page",
    "settings": "Settings",
    "twoUp": "Two page view"
  }
},
"seadragonCenterPanel": {
  "options": {
    "animationTime": 0.15,
    "autoHideControls": true,
    "attributionEnabled": true,
    "blendTime": 0,
    "constrainDuringPan": false,
    "controlsFadeAfterInactive": 1500,
    "controlsFadeDelay": 250,
    "controlsFadeLength": 250,
    "defaultZoomLevel": 0,
    "immediateRender": false,
    "maxZoomPixelRatio": 1.25,
    "navigatorPosition": "BOTTOM_RIGHT",
    "pageGap": 50,
    "showHomeControl": false,
    "trimAttributionCount": 150,
    "visibilityRatio": 0.5
  },
  "content": {
    "attribution": "Attribution",
    "goHome": "Go Home",
    "imageUnavailable": "Image Unavailable",
    "next": "Next",
    "previous": "Previous",
    "rotateRight": "Rotate Right",
    "zoomIn": "Zoom In",
    "zoomOut": "Zoom Out"
  }
},
"searchFooterPanel": {
  "options": {
    "elideDetailsTermsCount": 20,
    "elideResultsTermsCount": 10,
    "pageModeEnabled": true,
    "positionMarkerEnabled": true
  },
  "content": {
    "clearSearch": "Clear",
    "defaultLabel": "-",
    "displaying": "{0} {1} of {2}",
    "enterKeyword": "Enter Keyword",
    "image": "image",
    "imageCaps": "Image",
    "instanceFound": "1 instance of '{0}' found",
    "instancesFound": "{0} instances of '{1}' found",
    "nextResult": "Next Result",
    "page": "page",
    "pageCaps": "Page",
    "previousResult": "Previous Result",
    "print": "Print",
    "resultFoundFor": "result found for",
    "resultsFoundFor": "results found for",
    "searchWithin": "Search within this item:"
  }
},
"settingsDialogue": {
  "content": {
    "locale": "Locale",
    "navigatorEnabled": "Navigator Enabled",
    "clickToZoomEnabled": "Mouse Click To Zoom",
    "pagingEnabled": "Two Page View",
    "preserveViewport": "Preserve Zoom",
    "title": "Settings",
    "website": "<a href='https://github.com/universalviewer/universalviewer#contributors'>more info</a>"
  }
},
"shareDialogue": {
  "options": {
    "embedTemplate": "<div class=\"uv\" data-locale=\"{0}\" data-config=\"{1}\" data-uri=\"{2}\" data-collectionindex=\"{3}\" data-manifestindex=\"{4}\" data-sequenceindex=\"{5}\" data-canvasindex=\"{6}\" data-xywh=\"{7}\" data-rotation=\"{8}\" style=\"width:{9}px; height:{10}px; background-color: #000\"></div><script type=\"text/javascript\" id=\"embedUV\" src=\"{11}\"></script><script type=\"text/javascript\">/* wordpress fix */</script>",
    "instructionsEnabled": false,
    "shareFrameEnabled": true
  },
  "content": {
    "customSize": "custom",
    "embed": "Embed",
    "embedInstructions": "To embed this item in your own website, copy and paste the code below.",
    "height": "Height",
    "iiif": "IIIF Manifest",
    "share": "Share",
    "shareInstructions": "To share this item, copy the URL below.",
    "size": "Size:",
    "width": "Width"
  }
},
"clickThroughDialogue": {
  "content": {
    "viewTerms": "Read Full Terms and Conditions"
  }
},
"loginDialogue": {
  "content": {
    "login": "Login",
    "logout": "Logout",
    "cancel": "Cancel"
  }
},
"mobileFooterPanel": {
  "content": {
    "rotateRight": "Rotate Right",
    "moreInfo": "More Information",
    "zoomIn": "Zoom In",
    "zoomOut": "Zoom Out"
  }
},
"restrictedDialogue": {
  "content": {
    "cancel": "Cancel"
  }
}

},
“localisation”: {
“label”: “English (GB)”,
“locales”: [
{
“name”: “cy-GB”,
“label”: “Cymraeg”
},
{
“name”: “en-GB”,
“label”: “English (GB)”
}
]
},
“content”: {
“authCORSError”: “Your browser does not support CORS, please upgrade to view this content.”,
“authorisationFailedMessage”: “Your log-in attempt did not appear to be successful. Please try again.”,
“canvasIndexOutOfRange”: “Canvas index out of range.”,
“degradedResourceMessage”: “Please log in to view at full quality.”,
“degradedResourceLogin”: “log in”,
“forbiddenResourceMessage”: “Your current access rights are insufficient to view this image”,
“termsOfUse”: “Terms of Use”
}
}

Hey Jan,

Thanks you your reply. Just for fun I popped the JSON you posted in my config.json file and my viewer now just doesn’t load. Did you have to do anything else to make your viewer work? Or did that work “out of the box” with the module? Also, where did you find that list of configurations?

Regards,
Zach

I am also interested in a complete list of all possible configuration parameters. On the Github page of the Universial viewer the documentation is unfortunately not complete.