RE: how to bring in a costume theme inside web content

thumbnail
Ramalingaiah. D, modified 6 Years ago. Expert Posts: 489 Join Date: 8/16/14 Recent Posts
Hi Team,how to bring in a costume theme inside web content .
user version liferay 7.1
Regards

Ram
thumbnail
Mohammed Yasin, modified 6 Years ago. Liferay Master Posts: 593 Join Date: 8/8/14 Recent Posts
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/