Totara Learn Open Discussions

V.18 Customize Theme

 
NormanAmanda
Re: V.18 Customize Theme
NormanAmanda 发表于 2024年02月13日 Tuesday 12:33
小组 Partners

hi, is it possible to override this login.vue file to my own folder in client?
(core_auth/src/components/pages/login.vue)

i have client/theme_mytheme/global_styles in client to define buttons.. but if i want to add something in login.php, i have to add it in login.vue.. but how can i create a pathway in my client folders to override the default file?



WalkerPaul
Re: V.18 Customize Theme
WalkerPaul 发表于 2024年08月12日 Monday 01:35
小组 Partners

As you've suggested, the best way to override the 'Login.vue' page is via your own component theme, and not editing core files (which is the answer provided by the OP).


To override a page (E.g): 'core_auth/src/components/pages/login.vue'

use

'theme_mytheme/src/pages/overrides/core_auth/login.vue'


to override a component (E.g): 'core_auth/src/components/login/LoginForm.vue'

use

'theme_mytheme/src/components/overrides/core_auth/login/LoginForm.vue'


Remember to build the files via NPM ('npm tui-build') after creating these paths.