DSpace 8.0: Search Tab on Community/Collection pages

35 views
Skip to first unread message

Дмитрий Черных

unread,
Jun 26, 2024, 7:26:33 AM (3 days ago) Jun 26
to DSpace Technical Support
In DSpace 8.0 all Community and Collection pages now include a "Search" tab. Is it possible or to completely disable this tab or at least make it non-default? I want the "Subcommunities and Collections" tab to open by default, not a "Search" tab.

Thanks.

DSpace Technical Support

unread,
Jun 26, 2024, 5:45:09 PM (3 days ago) Jun 26
to DSpace Technical Support
Hi,

At this time, in DSpace 8, it's not configurable to change the default tab for Communities & Collections.  However, I think it'd be possible to change in code (I have to admit though that I haven't tested this myself)

The code which decides the tab ordering is all in "comcol-page-browse-by.component.ts" in the "ngOnInit()" method:


In that method, you can see it uses different tabs for "collection" vs "community".

The collection starts with a "search" tab, but then has other browse-by tabs (there is no "Subcommunities and Collections")
The community starts with the "search" tab, followed by "comcols" (Subcommunities & Collections) followed by all other browse tabs:
* (Uses the same set of browse by options as collections)

So, you might be able to just reorder the tabs in this page to get the behavior you want.  But, there is no configuration to do this at this time.

If you'd rather, you can also submit a ticket (https://github.com/DSpace/dspace-angular/issues to request a way to configure this.  Then, we'd search for a volunteer who is willing to work on adding such a configuration (as all development for DSpace is done by volunteers).

Hopefully that's helpful!
Tim

Abel Gómez

unread,
Jun 26, 2024, 6:02:23 PM (3 days ago) Jun 26
to DSpace Technical Support
Hi all,

I'm also interested in this, and when I tested DSpace 8 I think I tried something like the approach proposed by Tim and it didn't work (and as a consequence, I postponed the upgrade).

I'm talking from memory, but the main problem is that the "initial" active tab in the communities and collections page is selected based on the last segment of the community URL (and not the order of appearance).

In DSpace 7, the subcommunities and collections tab was rendered when the base URL for the community was navigated, e.g.:


But in DSpace 8, the URL for the subcommunities and collections has the "/subcom-cols" suffix, e.g.:


The default page for a community (in the above example "https://sandbox.dspace.org/communities/8b632938-77c2-487c-81f0-e804f63e68e6"), will always activate the "search" tab (which has no suffix), independently of the order of the tabs.

Thus, to activate the subcommunities and collections tab all links to communities and collections in DSpace would have to include the "/subcom-cols" suffix (which doesn't seem an easy fix to make).

Maybe the "https://sandbox.dspace.org/communities/8b632938-77c2-487c-81f0-e804f63e68e6" can directly redirect to "https://sandbox.dspace.org/communities/8b632938-77c2-487c-81f0-e804f63e68e6/subcoms-cols" (or whatever other preferred tab) but that would require that the search tab has its own "/search" suffix in the URL.

When I found the above issue I gave up since I wasn't able to find a satisfactory and straightforward solution.

Please, let me know if I'm mistaken. I'll be happy to be :-)

Abel
Reply all
Reply to author
Forward
0 new messages