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
What is the correct way to create a liferay theme?
Hello,
I am wondering what is the correct way of creating a new custom theme
for liferay CE 7.3.5ga6?
Should I generate a new theme via yeoman and this command:
yo liferay-theme
or
should I simply use the eclipse Liferay IDE and create it over
File -> New -> Liferay module Project -> Project Template Name -> 'Theme' ?
Is there any difference between these options?
It depends on the developers preferences, now you have these two ways to generate a new theme because the front-end developers no need to have Liferay IDE opened for their development. Normally they prefer to use other tools more friendly with front-end code together with NPM commands.
The only difference, I might say... is that if it is generated with yo liferay-theme is the deploy path asked. If you generate from IDE this path is not asked, because is suppose you are using a liferay-workspace and the setting about the path to deploy is inside gradle.properties.
Note: doesn’t matter if you generate outside. But if you want to put it to organize and deploy the theme inside a liferay-workspace after generate with Theme Generator, you need to be put inside "{liferay_workspace}/themes" folder.
thanks for your quick answer!
So even if there are some differences in files like for example web.xml (Liferay IDE) vs liferay-look-and-feel.xml (yo liferay-theme) it does not matter at all which approach I use in my project?
You can use the same scaffolding, generated by Yeoman inside the theme generated by Blade, this is just a difference by template which is generated because comes from Blade Template and other come from a Yeoman Template, one has dependencies on build.gradle and the other has the package.json. But the result finally after generating a war file it’s the same for both.
Powered by Liferay™