Totara Learn Open Discussions

V.18 Customize Theme

 
Amanda Norman
Re: V.18 Customize Theme
by Amanda Norman - Tuesday, 13 February 2024, 12:33 PM
Group 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?



Paul Walker
Re: V.18 Customize Theme
by Paul Walker - Monday, 12 August 2024, 1:35 AM
Group 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.