Please check general.properties file, In this file we set the default theme
{code}
# ID of the VisualTheme to use if there is no VISUAL_THEME UserPreference
record for the current user (ie default value)
VISUAL_THEME=TOMAHAWK
{code}Thanks & Regards -- Deepak Dixit www.hotwaxsystems.com www.hotwax.co On Thu, Jun 15, 2017 at 2:40 PM, Donhu Vy <[email protected]> wrote: > Thank you. But my webapp still load TOMAHAWK as selected theme in session. > How to make webapp set BOOTSTRAP as selected theme in session? > > ________________________________ > From: Michael Brohl <[email protected]> > Sent: Thursday, June 15, 2017 3:58:18 PM > To: [email protected] > Subject: Re: How to access resources file (css, js files from theme > folder) and get link from FTL? > > Hi Donhu, > > here is my answer from > > > The file paths to the theme ressources are stored in the theme data, for > example: > > <VisualThemeResource visualThemeId="TOMAHAWK" > resourceTypeEnumId="VT_HDR_JAVASCRIPT" > resourceValue="/images/jquery/plugins/asmselect/jquery. > asmselect-1.0.4a-beta.js" > sequenceId="05"/> > <VisualThemeResource visualThemeId="TOMAHAWK" > resourceTypeEnumId="VT_HDR_JAVASCRIPT" > resourceValue="/images/jquery/plugins/datetimepicker/jquery- > ui-timepicker-addon.min-1.4.3.js" > sequenceId="07"/> > <VisualThemeResource visualThemeId="TOMAHAWK" > resourceTypeEnumId="VT_HDR_JAVASCRIPT" > resourceValue="/images/jquery/plugins/fjTimer/jquerytimer-min.js" > sequenceId="09"/> > <VisualThemeResource visualThemeId="TOMAHAWK" > resourceTypeEnumId="VT_HDR_JAVASCRIPT" > resourceValue="/images/jquery/plugins/jquery.maskedinput-1.3.1.min.js" > sequenceId="10"/> > <VisualThemeResource visualThemeId="TOMAHAWK" > resourceTypeEnumId="VT_HDR_JAVASCRIPT" > resourceValue="/images/jquery/plugins/jeditable/jquery.jeditable.js" > sequenceId="11"/> > <VisualThemeResource visualThemeId="TOMAHAWK" > resourceTypeEnumId="VT_HDR_JAVASCRIPT" > resourceValue="/images/jquery/plugins/validate/jquery.validate.min.js" > sequenceId="12"/> > > In this case, all Javascript ressources for the header are stored under > the same resourceTypeEnumId with different sequenceId's to control the > load sequence. > > You can then access these ressources in your ftl templates, for example > the Header.ftl in the Tomahawk theme: > > <#if layoutSettings.VT_HDR_JAVASCRIPT?has_content> > <#list layoutSettings.VT_HDR_JAVASCRIPT as javaScript> > <script > src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ > ofbizContentUrl>" > type="text/javascript"></script> > </#list> > </#if> > > They are rendered in the header like this: > > <script > src="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.js" > type="text/javascript"></script> > <script > src="/images/jquery/plugins/datetimepicker/jquery-ui- > timepicker-addon.min-1.4.3.js" > type="text/javascript"></script> > <script src="/images/jquery/plugins/fjTimer/jquerytimer-min.js" > type="text/javascript"></script> > <script > src="/images/jquery/plugins/jquery.maskedinput-1.3.1.min.js" > type="text/javascript"></script> > <script src="/images/jquery/plugins/jeditable/jquery.jeditable.js" > type="text/javascript"></script> > <script > src="/images/jquery/plugins/validate/jquery.validate.min.js" > type="text/javascript"></script> > > The ressources must be stored in the > /themes/theme-name/webapp/theme-name/ subfolders like /images, /css > etc.. Of course you can specify a different subfolder layout and change > the VisualThemeResource entries accordingly. > > Best regards, > > Michael Brohl > ecomify GmbH > www.ecomify.de<http://www.ecomify.de> > > > Am 15.06.17 um 10:29 schrieb Donhu Vy: > > I have "Neon - Bootstrap Admin Theme" (https://themeforest.net/item/ > neon-bootstrap-admin-theme/6434477 ). My duty is integrating this > bootstrap theme into Ofbiz 16.11.02. I tried 3 days, but I stucked. > > > > This is my full source code: https://gitlab.com/Donhu/ofbiz > > I have been create a new theme, named it is "BOOTSTRAP", based on theme > "TOMAHAWK". > > > > I don't know how to access static resource files (css, js, image) > > > > I have add more information to https://gitlab.com/Donhu/ > ofbiz/blob/master/framework/common/config/CommonEntityLabels.xml > > https://gitlab.com/Donhu/ofbiz/tree/master/themes/bootstrap (first > step, I cloned from TOMAHAWK). > > > > These files (https://gitlab.com/Donhu/ofbiz/tree/master/themes/ > bootstrap/webapp/bootstrap/assets) come from "Neon - Bootstrap Admin > Theme". I don't know how to access, how to get its relative links, and put > inside FTL file (for example: https://gitlab.com/Donhu/ > ofbiz/blob/master/themes/bootstrap/template/Header.ftl#L47 Current, it > doesn't work) > > > > My question: How to access static files from customize theme folder, put > it to FTL file? > > > > Thank you very much! > > > > (https://stackoverflow.com/questions/44562497/how-to- > access-resources-file-css-js-files-from-theme-folder-and-get-link-from ) > > > > > > > > >
