Totara Learn Open Discussions

V.18 Customize Theme

 
Servando Pineda
V.18 Customize Theme
par Servando Pineda, Tuesday 9 January 2024, 15:21
Groupe Helpful contributor 2024Groupe PartnersGroupe TXP Site Administrator

Hi, In Totara V18 we tried to create a custom landing page. On Totara v17 we didn't have any problems, just change HTML and CSS code and it works! But on V18 with the VUE framework the landing page does not apply the custom code...

Do you have any idea how to apply the CCS code?

Craig Eves
Re: V.18 Customize Theme
par Craig Eves (Totara Support), Tuesday 9 January 2024, 19:14
Groupe Totara

Hi Servanda

There is some documentation on overriding styles here

Can you describe what you mean by custom code - what sort of code is this?

regards

Servando Pineda
Re: V.18 Customize Theme
par Servando Pineda, Wednesday 10 January 2024, 09:17
Groupe Helpful contributor 2024Groupe PartnersGroupe TXP Site Administrator

In loggingpage we used to create a tag inside a div. See the example.

Now we will try with the code in this file: cod_totara/client/component/core_auth/src/pages/Login.vue

But it doesn't work

Is it the right file?

I just want to add a little bit of HTML code to the login page.

Craig Eves
Re: V.18 Customize Theme
par Craig Eves (Totara Support), Wednesday 10 January 2024, 13:59
Groupe Totara

Hi Servando

Thanks for the further details - this looks like you may need to rebuild TUI as detailed inhttps://totara.atlassian.net/wiki/spaces/DEV/pages/121188213/The+build+process .

Can you try this to see if this resolves the problem?

regards


Servando Pineda
Re: V.18 Customize Theme
par Servando Pineda, Tuesday 23 January 2024, 09:57
Groupe Helpful contributor 2024Groupe PartnersGroupe TXP Site Administrator

Hi Craig.

Just to thank you. All works, we update the vue.js files with the NPM.

See you soon.

Amanda Norman
Re: V.18 Customize Theme
par Amanda Norman, Tuesday 13 February 2024, 12:33
Groupe 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
par Paul Walker, Monday 12 August 2024, 01:35
Groupe 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.