Hi all (again), to continue with this discussion, I finally had time to take a closer look to this issue taking into account the problem with the URLs.
I have created the following PR to make the default tab when browsing a community/collection configurable: https://github.com/DSpace/dspace-angular/pull/3164 In any case, the changes to implement an ad-hoc solution are not too many. Besides reordering the tabs as suggested by Tim in the previous message, it would also be necessary to modify the routes of some components. Something like the following should work: 1. Specify a path (such as 'search') for the 'ComcolSearchSectionComponent': https://github.com/DSpace/dspace-angular/blob/c3a26ea89e235b5b9cd83c57704ceb045adce3e1/src/app/community-page/community-page-routes.ts#L75 2. Remove the path for SubComColSectionComponent: https://github.com/DSpace/dspace-angular/blob/c3a26ea89e235b5b9cd83c57704ceb045adce3e1/src/app/community-page/community-page-routes.ts#L80 3. Optionally, also define breadcrumbs. 4. Also modify "collection-page-routes.ts" similarly to "community-page-routes.ts" 5. Adjust the https://github.com/DSpace/dspace-angular/blob/main/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts file according to the new routes (e.g., lines 102, 109 and 114). 6. Optionally, reorder the tabs as desired. Hope this helps. Cheers! Abel El jueves, 27 de junio de 2024 a las 0:02:23 UTC+2, Abel Gómez escribió: > 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.: > > https://demo.dspace.org/communities/f855313d-9cf1-4e7d-9c1e-5d91f26e56be > > But in DSpace 8, the URL for the subcommunities and collections has the > "/subcom-cols" suffix, e.g.: > > > https://sandbox.dspace.org/communities/8b632938-77c2-487c-81f0-e804f63e68e6/subcoms-cols > > 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 > > El miércoles, 26 de junio de 2024 a las 23:45:09 UTC+2, DSpace Technical > Support escribió: > >> 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: >> >> >> https://github.com/DSpace/dspace-angular/blob/dspace-8_x/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts#L90 >> >> 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") >> * Search tab: >> https://github.com/DSpace/dspace-angular/blob/dspace-8_x/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts#L99-L103 >> * All other browse by tabs after that: >> https://github.com/DSpace/dspace-angular/blob/dspace-8_x/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts#L118-L122 >> >> The community starts with the "search" tab, followed by "comcols" >> (Subcommunities & Collections) followed by all other browse tabs: >> * Search tab: >> https://github.com/DSpace/dspace-angular/blob/dspace-8_x/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts#L106-L110 >> * ComCols tab: >> https://github.com/DSpace/dspace-angular/blob/dspace-8_x/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts#L111-L115 >> * (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 >> >> On Wednesday, June 26, 2024 at 6:26:33 AM UTC-5 [email protected] >> wrote: >> >>> 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. >>> >> -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/fa71b478-0ac7-42dd-8660-b5e63bc10145n%40googlegroups.com.
