You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, this is more of a question than a issue, but is there any way to cleanly add a builder to this process?
I need to add thumbnail support to the manifest and I know I can overwrite things and all that, but I was hoping there was a place where I could just insert my own builder and let the code run as intended.
I'm happy to clarify, if I'm not being clear. Thanks.
The text was updated successfully, but these errors were encountered:
@travisLilleberg I'm not sure if there is an easy/clean way to add a builder other than overriding ManifestServiceLocator#manifest_builders and adding in your builder. I'm going to be working on adding thumbnail (and posterCanvas in V3 manifests) soon. Did you figure out a better solution?
I ended up overriding the Hyrax::WorksControllerBehavior#manifest method in our Image controller - building the json, and then attaching the thumbnail info at the end before rendering it.
moduleHyraxclassImagesController < CatalogControllerincludeHyrax::WorksControllerBehaviorself.curation_concern_type= ::Imageself.show_presenter=Hyrax::ImagePresenter#### Adds thumbnails to the IIIF Manifest for images.defmanifestheaders['Access-Control-Allow-Origin']='*'manifest_json=manifest_builder.to_hmanifest_json['thumbnail']={'@id'=>thumbnail}renderjson: manifest_jsonendprivate#### Gets the external thumbnail path of a resource.defthumbnailthumbnail_path=Hyrax::ThumbnailPathService.call(@presenter).slice(1..-1)root_url + thumbnail_pathendendend
I'm open to better ways of doing this, if you can think of any! I hope this helps.
Hello, this is more of a question than a issue, but is there any way to cleanly add a builder to this process?
I need to add thumbnail support to the manifest and I know I can overwrite things and all that, but I was hoping there was a place where I could just insert my own builder and let the code run as intended.
I'm happy to clarify, if I'm not being clear. Thanks.
The text was updated successfully, but these errors were encountered: