Customization of ds-thumbnail component

116 views
Skip to first unread message

Arun Tom Skariah

unread,
Mar 24, 2024, 10:28:33 PM3/24/24
to DSpace Technical Support
Hello everyone,

I am currently trying to customize the thumbnail component within my own theme. But for some reason, the changes I made in my own theme are not picked up for the thumbnail component. Instead the  thumbnail component from the base theme is being displayed. 

I followed the steps during implemetation:

- Create a folder in 'myTheme' that matches the thumbnail component folder from the custom directory (https://github.com/DSpace/dspace-angular/tree/dspace-7.6.1/src/themes/custom/app/thumbnail)
- Updated the template url to   templateUrl: './thumbnail.component.html',
- Registered the component folder in lazy-theme.module.ts for 'myTheme'
- Re-build the UI

Anyone ran into something similar or have an idea what I might have done wrong?

Cheers,
Arun

schu...@effective-webwork.de

unread,
Nov 7, 2024, 10:49:48 AM11/7/24
to DSpace Technical Support
Hello Arun,

I'm experiencing the same behaviour. Did you find any solution for this?

Regards
Johannes

schu...@effective-webwork.de

unread,
Nov 8, 2024, 7:19:46 AM11/8/24
to DSpace Technical Support
Hello everyone,

I think I found the reason. I followed the guide of how to create your own themed components at https://wiki.lyrasis.org/display/DSDOC7x/User+Interface+Customization

This step seems not to have been completed for ds-thumbnail:

Replace any existing reference to the original component with a reference to the themed version: e.g. swap <ds-root> with <ds-themed-root> in app.component.html

After I replace "<ds-thumbnail>...</ds-thumbnail>" with "<ds-themed-thumbnail>...</ds-themed-thumbnail>" in /src/app and /src/themes/my-theme the changes in my custom HTML-page appear.

Was this the right fix and would this be worth a pull request for version 7?

Regards
Johannes

Reply all
Reply to author
Forward
0 new messages