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
RE: how to bring in a costume theme inside web content
Hi Team,how to bring in a costume theme inside web content .
user version liferay 7.1
Regards
Ram
user version liferay 7.1
Regards
Ram
Hi,
If the custom theme is applied to the page where web content is display its will be available to web content you can access by using ThemeDisplay object
Css <link rel="stylesheet" href="${themeDisplay.getPathThemeRoot()}/css/custom.css">
JS - <script src="${themeDisplay.getPathThemeRoot()}/js/myscripts.js"></script>
You can refer your current theme files from template using ${themeDisplay.getPathThemeRoot()}
if you want to access other theme from webcontent then you can access
Css <link rel="stylesheet" href="/o/your-theme-name/css/custom.css">
JS - <script src="/o/your-theme-name/js/myscripts.js"></script>
You can refer your other theme files from /o/your-theme-name/
If the custom theme is applied to the page where web content is display its will be available to web content you can access by using ThemeDisplay object
Css <link rel="stylesheet" href="${themeDisplay.getPathThemeRoot()}/css/custom.css">
JS - <script src="${themeDisplay.getPathThemeRoot()}/js/myscripts.js"></script>
You can refer your current theme files from template using ${themeDisplay.getPathThemeRoot()}
if you want to access other theme from webcontent then you can access
Css <link rel="stylesheet" href="/o/your-theme-name/css/custom.css">
JS - <script src="/o/your-theme-name/js/myscripts.js"></script>
You can refer your other theme files from /o/your-theme-name/