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
How to create themes in 7.1?
Has anyone had any success creating or extending the _styled theme in
Liferay 7.1?
Are there any instructions available or a github repo
setup?
Thanks!!
Sean Gildea:Are there any instructions available or a github repo setup?
https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-1/introduction-to-themes
Thanks Samuel!!,
I followed the instructions and was able to generate one using Node/Gulp/Yo and it deployed it automatically to my new 7.1 server. Here are some personal notes ( for others facing the same issue ) on the instructions from the link you provided... (ps, I'm using Windows )
- Update Node JS and download the latest MSI from the Node JS website
- npm install -g yo gulp generator-liferay-theme
- yo liferay-theme
- Make sure you type out every answer while generating the theme, do not use "y" for yes when it asks if the theme ID is ok, you must type it out fully
- Once it generates it, open a new bash command window, nav to the folder it created, run "gulp deploy"
- Then it will automatically drop it into the /deploy dir of your app server
Now the question is, how do I import the generated code into Liferay IDE so I can modify it?
I'm not that familiar with Liferay IDE. Perhaps you can post your question over at https://community.liferay.com/forums/-/message_boards/category/8408731
I tried it now and I think the IDE still creates a Liferay 7.0 theme (and it seems, blade does the same)
dependencies {
parentThemes group:
"com.liferay", name:
"com.liferay.frontend.theme.styled", version:
"2.0.13"
parentThemes group:
"com.liferay", name:
"com.liferay.frontend.theme.unstyled", version: "2.0.13"
portalCommonCSS group: "com.liferay", name: "com.liferay.frontend.css.common", version: "2.0.3"
themeBuilder group: "com.liferay", name:
"com.liferay.portal.tools.theme.builder", version:
"1.1.3"
}
Didn't test it, but at least the three "2.0.13" gav coordinates look quite "7.0"ish. Probably should be 3.0.something instead. Of course, maybe there's more that has to be fixed.