Ouch!

I'm sorry to hear that modifying the stock routing module was the only 
way...

Anyway, it's true that, although it's a "hack", the modifications can be 
minimal.

Thanks for sharing your experience on this. Let's see if a "hooking" 
mechanism is added to the routing module in the future... If I have time, 
I'll try to implement something more portable/themable.

Cheers,

Abel

El viernes, 14 de abril de 2023 a las 15:20:29 UTC+2, Mark H. Wood escribió:

> On Thu, Apr 13, 2023 at 01:58:51PM -0700, Abel Gómez wrote:
> > I've been working on a theme and customization for DSpace 7, and I've 
> > stumbled upon a problem I'm not really sure whether it's solvable or not.
> > 
> > I'd like to add some additional routes and modules to serve some 
> additional 
> > sections in the DSpace site (mostly static HTML) but keeping the look 
> and 
> > feel of my custom theme, and keeping the breadcrumbs and navigation 
> > features if possible. After inspecting the code, I've figured out the 
> way 
> > to do it by modifying the "base app" (e.g., AppRoutingModule, and adding 
> > the needed modules under src/app/...), but I'd like to keep my 
> > modifications as modular and isolated as possible.
> > 
> > Is there any way to achieve the same by modifying only my custom theme 
> in 
> > "src/themes/mytheme", and without changing the "base code" of DSpace 
> > angular in "src/app"?
>
> I haven't found a way to completely eliminate hacks to the stock
> routing module, but I did manage a static "About Us" page that exists
> within our local theme and requires only a reference in
> 'src/app/app-routing.module.ts':
>
> ------------------------ src/app/app-routing.module.ts 
> ------------------------
> index d426b041c..2d5b27797 100644
> @@ -41,9 +41,12 @@ import { ServerCheckGuard } from 
> './core/server-check/server-check.guard';
> import { MenuResolver } from './menu.resolver';
> import { ThemedPageErrorComponent } from 
> './page-error/themed-page-error.component';
>
> +import { AboutComponent } from 
> '../themes/scholarworks/app/static/about/about-page.component';
> +
> @NgModule({
> imports: [
> RouterModule.forRoot([
> + { path: 'about', component: AboutComponent },
> { path: INTERNAL_SERVER_ERROR, component: 
> ThemedPageInternalServerErrorComponent },
> { path: ERROR_PAGE , component: ThemedPageErrorComponent },
> {
>
> AboutComponent consists of an empty class, an empty stylesheet, and a
> single 'div' providing a basic description of the repo. plus links to
> further reading and a 'mailto:'.
>
> The close coupling between stock and theme led me to leave this commit
> message:
>
> Add a link and an About page.
>
> This required adding the route in the main routing module, pointing into 
> our
> theme. That is a nasty hack and should be fixed when I find out how to put
> the route into our theme's module.
>
> -- 
> Mark H. Wood
> Lead Technology Analyst
>
> University Library
> Indiana University - Purdue University Indianapolis
> 755 W. Michigan Street
> Indianapolis, IN 46202
> 317-274-0749 <(317)%20274-0749>
> www.ulib.iupui.edu
>

-- 
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/b7443346-a5fe-44cb-bd10-610628208116n%40googlegroups.com.

Reply via email to