DSpace 7.3, multiple custom themes

439 views
Skip to first unread message

Bill Tantzen

unread,
Aug 23, 2022, 1:07:30 PM8/23/22
to DSpace Technical Support
I'm experimenting with creating custom themes for a couple of communities and collections.  I have a default theme with all the components in 'custom', along with a theme for a specific community, and one for a specific collection.  My theme config is like so:

themes:
  - name: 'community_a'
    extends: 'default'
    handle: 'xxxxx/183663'
                
  - name: 'collection_a'
    extends: 'default'
    handle: 'xxxxx/166578'

  - name: 'default'

In my 'community_a' theme, I have a community-page component
In my 'collection_a' theme, I have a collection-page component and an item-page component.  The default theme has all themeable components.

The problem I am having is that regardless of which community or collection to which an item belongs, it is themed by the item-page component in the 'collection_a' theme (the first one it encounters).

My understanding was that items in collection_a are themed by the component I override there, and that the default theme takes care of everything else.

Am I misunderstanding something, have I misconfigured something, or is this a bug?  Anybody else out there experimenting with multiple themes?

Thanks for any advice!
~~Bill
--
Human wheels spin round and round
While the clock keeps the pace... -- John Mellencamp
________________________________________________________________
Bill Tantzen    University of Minnesota Libraries
612-626-9949 (U of M)    612-325-1777 (cell)

Bill Tantzen

unread,
Aug 23, 2022, 3:42:20 PM8/23/22
to DSpace Technical Support
OK, here is some further info:  The correct ItemPageComponent is being selected correctly, but the UntypedItemComponent is the piece that is incorrect.

UntypedItemComponent is NOT in the custom theme directory, so maybe it is not themeable?

Has anybody fooled around with this?  My goal is to have differently themed item pages depending on a per-collection or per-community basis...  Specifically, different metadata, and it looks like UntypedItemComponent is where this magic happens.

Ideas?
~~Bill

Mark H. Wood

unread,
Aug 24, 2022, 7:34:56 AM8/24/22
to dspac...@googlegroups.com
On Tue, Aug 23, 2022 at 02:42:03PM -0500, 'Bill Tantzen' via DSpace Technical Support wrote:
> OK, here is some further info: The correct ItemPageComponent is being
> selected correctly, but the UntypedItemComponent is the piece that is
> incorrect.
>
> UntypedItemComponent is NOT in the custom theme directory, so maybe it is
> not themeable?
>
> Has anybody fooled around with this? My goal is to have differently themed
> item pages depending on a per-collection or per-community basis...
> Specifically, different metadata, and it looks like UntypedItemComponent is
> where this magic happens.

I ran into this as well. One thing that is special is that
UntypedItemComponent is decorated '@listableObjectComponent' so it is
made theme-able in a different way. Look for 'listableObject' in
https://wiki.lyrasis.org/display/DSDOC7x/User+Interface+Customization
for more information.

I wish I could just tell you what worked, but I spent days floundering
around in the code and the memories are blurred.
> --
> All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
> ---
> You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CADgrb7FjrmSz%3DjnzficmzXJUVMkkYSJ0kZP2HDFj06MZR258HQ%40mail.gmail.com.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc

Bill Tantzen

unread,
Aug 24, 2022, 8:38:38 AM8/24/22
to dspac...@googlegroups.com
Thanks Mark!
So, just to be clear, you have two distinct themes with two different UntypedItemComponents (I was able to implement and override one in my default theme, it's the second one in a different theme that fails...)?  I just wanted to make sure I am not going down a dead end street!

I thought I did give it the listableObjectComponent special treatment, but I will check again...  I no doubt missed something if you were successful.
~~Bill

Mark H. Wood

unread,
Aug 24, 2022, 9:19:39 AM8/24/22
to dspac...@googlegroups.com
On Wed, Aug 24, 2022 at 07:38:22AM -0500, 'Bill Tantzen' via DSpace Technical Support wrote:
> Thanks Mark!
> So, just to be clear, you have two distinct themes with two different
> UntypedItemComponents (I was able to implement and override one in my
> default theme, it's the second one in a different theme that fails...)? I
> just wanted to make sure I am not going down a dead end street!

Not yet, but I do have one custom theme with its own
UntypedItemComponent and I do get that one, not the stock one.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CADgrb7GA7ucJh_tsm3qmS7d9pL%2BwStpNNN25%2Bfm%3D5RRzmOKgKA%40mail.gmail.com.
signature.asc

Bill Tantzen

unread,
Aug 24, 2022, 9:29:03 AM8/24/22
to dspac...@googlegroups.com
Right, that much worked for me as well (with your help initially) -- adding a second one seems to be the problem...  Only one of the UntypedItemComponents is leveraged, regardless of the selected theme.  Which seems weird to me:  the correct ItemPageComponent is in use, but an UntypedItemComponent from a different theme and directory is leveraged.

I will continue to experiment.
~~Bill

Kiriaki Roditi

unread,
Oct 25, 2022, 3:52:04 AM10/25/22
to Bill Tantzen, dspac...@googlegroups.com

Hello,

 

Just came across a comment in https://wiki.lyrasis.org/display/DSDOC7x/User+Interface+Customization with instructions, by Art Lowel, on how to use different themed versions of the same component, that has not been made theme-able yet.

Have you tried it?

 

Best regards,

Kiriaki Roditi

Systems Engineer

 


ELiDOC Systems & Services

Irakliou Str. 162-164 | Athens, Greece | P.C. 111 42 | www.elidoc.gr

Reply all
Reply to author
Forward
0 new messages