Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Custom Theme with DXP
Hello,
I have some questions about the new process of creating a new theme using Liferay DXP.
I created a new theme project using Yeoman (liferay theme-yo).
Its created a new project in my root with the structure.
build (Where build my project, when I used the gulp (gulp deploy)
dist (the war of my theme to be distributed)
src (directory of my work to customize).
My question would be this directory (src), within it we have:
css
templates
WEB-INF
Pergunta 1
Where should I put my images, css, js? It would be within the src or WEB-INF?
Pergunta 2
Thinking that the custom.css file should I move used the "src / css / _custom.scss"
In this place I created a subfolder called "cssCustom" and it entered my css.
I edited the file "src / css / _custom.scss" and put the following line "@import url (" cssCustom / estilo.css ")"
But he shows me error that did not find the file.
Can anybody help me ?
Tanks!!!
I have some questions about the new process of creating a new theme using Liferay DXP.
I created a new theme project using Yeoman (liferay theme-yo).
Its created a new project in my root with the structure.
build (Where build my project, when I used the gulp (gulp deploy)
dist (the war of my theme to be distributed)
src (directory of my work to customize).
My question would be this directory (src), within it we have:
css
templates
WEB-INF
Pergunta 1
Where should I put my images, css, js? It would be within the src or WEB-INF?
Pergunta 2
Thinking that the custom.css file should I move used the "src / css / _custom.scss"
In this place I created a subfolder called "cssCustom" and it entered my css.
I edited the file "src / css / _custom.scss" and put the following line "@import url (" cssCustom / estilo.css ")"
But he shows me error that did not find the file.
Can anybody help me ?
Tanks!!!
The strangest thing was to follow the following steps:
1) edit the file "src/css/_custom.scss" and add this line
@import "layout/variables";
@import "layout/layout";
2) executed the command gulp deploy and works !
3) in the folder "src/css/" , i add new file called "test.css"
4) i opened the file _custom.scss and add the line
@import "teste.css"; and don't work ....
Please can help me!
1) edit the file "src/css/_custom.scss" and add this line
@import "layout/variables";
@import "layout/layout";
2) executed the command gulp deploy and works !
3) in the folder "src/css/" , i add new file called "test.css"
4) i opened the file _custom.scss and add the line
@import "teste.css"; and don't work ....
Please can help me!
I understand the problem.
In the folder src/image i created the subfolder custom.
in the folder js i created the subfolder custom.
the same for css.
And works
In the folder src/image i created the subfolder custom.
in the folder js i created the subfolder custom.
the same for css.
And works
Hi... can you be moore explicit for good understanding? I created custom theme for Liferay 7 with yo liferay theme generator and i dont know how import images...
thank you
thank you
Hi!
I have a similar question/error report.
So I created a Liferay 7 theme with Yo and set the SASS to Ruby Compass as it is told in the tutorial.
Whatever change I write in the _custom.scss file does not apply to the theme. I probably miss something, but it isn't pointed out, what. Could you help me find out what is the problem?
I'd mention that during theme deployment the console prints out a ton of Warning messages. Is that normal?
Lastly, as an other question... In the theme's directory I created with Yo, I created custom layouts too. Everything gets build in the War file for deployment, but I cannot find any of the custom templates in the Portal.
Thanks for your help! Much appreciations!
I have a similar question/error report.
So I created a Liferay 7 theme with Yo and set the SASS to Ruby Compass as it is told in the tutorial.
Whatever change I write in the _custom.scss file does not apply to the theme. I probably miss something, but it isn't pointed out, what. Could you help me find out what is the problem?
I'd mention that during theme deployment the console prints out a ton of Warning messages. Is that normal?
Lastly, as an other question... In the theme's directory I created with Yo, I created custom layouts too. Everything gets build in the War file for deployment, but I cannot find any of the custom templates in the Portal.
Thanks for your help! Much appreciations!
Did you run on the theme root:
1. npm install
2. gulp init
First step will install everything you theme require to operate.
Second one will give direction where to deploy the theme.
Note: you shouldn't have a lot of warning messages.
1. npm install
2. gulp init
First step will install everything you theme require to operate.
Second one will give direction where to deploy the theme.
Note: you shouldn't have a lot of warning messages.
User$ gulp deploy
[15:24:54] Using gulpfile ~/Documents//project/themes/project-theme/gulpfile.js
[15:24:54] Starting 'deploy'...
[15:24:54] Starting 'build'...
[15:24:54] Starting 'build:clean'...
[15:24:55] Finished 'build:clean' after 167 ms
[15:24:55] Starting 'build:base'...
[15:24:56] Finished 'build:base' after 1.41 s
[15:24:56] Starting 'build:src'...
[15:24:56] Starting 'metal:soy'...
[15:24:56] Finished 'metal:soy' after 15 ms
[15:24:56] Starting 'metal:build:amd'...
[15:24:56] Starting 'metal:build:amd:js'...
[15:24:58] Finished 'metal:build:amd:js' after 1.5 s
[15:24:58] Finished 'metal:build:amd' after 1.5 s
[15:24:58] Starting 'config:amd'...
[15:24:58] Finished 'config:amd' after 467 ms
[15:24:58] Starting 'provide-capability-property'...
[15:24:58] Finished 'provide-capability-property' after 9.88 ms
[15:24:58] Finished 'build:src' after 2.34 s
[15:24:58] Starting 'build:web-inf'...
[15:24:58] Finished 'build:web-inf' after 1.5 ms
[15:24:58] Starting 'build:liferay-look-and-feel'...
[15:24:58] Finished 'build:liferay-look-and-feel' after 16 ms
[15:24:58] Starting 'build:hook'...
[15:24:58] Finished 'build:hook' after 7.34 ms
[15:24:58] Starting 'build:themelets'...
[15:24:58] Starting 'build:themelet-src'...
[15:24:58] Finished 'build:themelet-src' after 821 μs
[15:24:58] Starting 'build:themelet-css-inject'...
[15:24:58] Starting 'build:themelet-js-inject'...
[15:24:58] gulp-inject Nothing to inject into _custom.scss.
[15:24:58] gulp-inject Nothing to inject into portal_normal.ftl.
[15:24:58] Finished 'build:themelet-css-inject' after 30 ms
[15:24:58] Finished 'build:themelet-js-inject' after 13 ms
[15:24:58] Finished 'build:themelets' after 32 ms
[15:24:58] Starting 'build:rename-css-dir'...
[15:24:58] Finished 'build:rename-css-dir' after 252 μs
[15:24:58] Starting 'build:prep-css'...
[15:24:58] Finished 'build:prep-css' after 60 μs
[15:24:58] Starting 'build:compile-css'...
[15:24:58] Starting 'build:compile-lib-sass'...
[15:24:59] Finished 'build:compile-lib-sass' after 665 ms
[15:24:59] Finished 'build:compile-css' after 666 ms
[15:24:59] Starting 'build:fix-url-functions'...
[15:24:59] Finished 'build:fix-url-functions' after 43 ms
[15:24:59] Starting 'build:move-compiled-css'...
[15:25:00] Finished 'build:move-compiled-css' after 491 ms
[15:25:00] Starting 'build:remove-old-css-dir'...
[15:25:00] Finished 'build:remove-old-css-dir' after 95 ms
[15:25:00] Starting 'build:fix-at-directives'...
[15:25:00] Finished 'build:fix-at-directives' after 23 ms
[15:25:00] Starting 'build:r2'...
[15:25:00] Finished 'build:r2' after 153 ms
[15:25:00] Starting 'build:war'...
[15:25:00] Starting 'plugin:version'...
[15:25:00] Finished 'plugin:version' after 1.05 ms
[15:25:00] Starting 'plugin:war'...
[15:25:01] Finished 'plugin:war' after 676 ms
[15:25:01] Finished 'build:war' after 678 ms
[15:25:01] Finished 'build' after 6.13 s
[15:25:01] Starting 'plugin:deploy'...
[15:25:01] Deploying to /User/.../liferay-dxp-digital-enterprise-7.0-sp3/deploy
[15:25:01] Finished 'plugin:deploy' after 8.04 ms
[15:25:01] Starting 'deploy:war'...
[15:25:01] Finished 'deploy:war' after 28 μs
[15:25:01] Finished 'deploy' after 6.14 s