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 ) |
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 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 ) > > > smime.p7s (5K) Download Attachment |
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 <[hidden email]> Sent: Thursday, June 15, 2017 3:58:18 PM To: [hidden email] 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 ) > > > |
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 <[hidden email]> 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 <[hidden email]> > Sent: Thursday, June 15, 2017 3:58:18 PM > To: [hidden email] > 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 ) > > > > > > > > > |
I added the default theme entry part in the stackoverflow answer, thanks
Deepak :-) Am 15.06.17 um 11:14 schrieb Deepak Dixit: > 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 <[hidden email]> 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 <[hidden email]> >> Sent: Thursday, June 15, 2017 3:58:18 PM >> To: [hidden email] >> 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 ) >>> >>> >> >> smime.p7s (5K) Download Attachment |
Thank Deepak Dixit about suggestion
#VISUAL_THEME=TOMAHAWK VyDN VISUAL_THEME=BOOTSTRAP inside general.properries and thank to Michael Brohl. But I still can not load static files from own theme (although re-run gradlew cleanAll ofbiz) My wishing: https://user-images.githubusercontent.com/1328316/27174784-799b01b8-51e7-11e7-8356-d8a5197ebd5a.jpg Current reality: https://user-images.githubusercontent.com/1328316/27174770-6bc6c612-51e7-11e7-9a26-75fa43d75d48.jpg Help me fix this problem! ________________________________ From: Michael Brohl <[hidden email]> Sent: Thursday, June 15, 2017 4:22:23 PM To: [hidden email] Subject: Re: How to access resources file (css, js files from theme folder) and get link from FTL? I added the default theme entry part in the stackoverflow answer, thanks Deepak :-) Am 15.06.17 um 11:14 schrieb Deepak Dixit: > 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<http://www.hotwaxsystems.com> > www.hotwax.co<http://www.hotwax.co> > > On Thu, Jun 15, 2017 at 2:40 PM, Donhu Vy <[hidden email]> 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 <[hidden email]> >> Sent: Thursday, June 15, 2017 3:58:18 PM >> To: [hidden email] >> 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 ) >>> >>> >> >> |
Did you populate the database with your data and access it in the Header
template of your theme? Are the static file links got rendered in your html? We'll need some more infor what you already did and what does not work concretely. Michael Am 15.06.17 um 11:31 schrieb Donhu Vy: > Thank Deepak Dixit about suggestion > > #VISUAL_THEME=TOMAHAWK VyDN > VISUAL_THEME=BOOTSTRAP > inside general.properries > > and thank to Michael Brohl. > > But I still can not load static files from own theme (although re-run gradlew cleanAll ofbiz) > > My wishing: https://user-images.githubusercontent.com/1328316/27174784-799b01b8-51e7-11e7-8356-d8a5197ebd5a.jpg > > Current reality: https://user-images.githubusercontent.com/1328316/27174770-6bc6c612-51e7-11e7-9a26-75fa43d75d48.jpg > > Help me fix this problem! > > > ________________________________ > From: Michael Brohl <[hidden email]> > Sent: Thursday, June 15, 2017 4:22:23 PM > To: [hidden email] > Subject: Re: How to access resources file (css, js files from theme folder) and get link from FTL? > > I added the default theme entry part in the stackoverflow answer, thanks > Deepak :-) > > Am 15.06.17 um 11:14 schrieb Deepak Dixit: >> 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<http://www.hotwaxsystems.com> >> www.hotwax.co<http://www.hotwax.co> >> >> On Thu, Jun 15, 2017 at 2:40 PM, Donhu Vy <[hidden email]> 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 <[hidden email]> >>> Sent: Thursday, June 15, 2017 3:58:18 PM >>> To: [hidden email] >>> 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 ) >>>> >>> > > smime.p7s (5K) Download Attachment |
Thank Michael Brohl,
After run gradle cleanAll loadDefault ofbiz (not gradle cleanAll ofbiz like early). Loaded ok: https://user-images.githubusercontent.com/1328316/27175657-10955198-51ea-11e7-9ff7-c1ca1a44ec33.jpg But these are broken links: https://user-images.githubusercontent.com/1328316/27175679-1e5d8a5c-51ea-11e7-94fc-ec363e0ae329.jpg Help me access static resources files correctly (at this time, these are broken links). ________________________________ From: Michael Brohl <[hidden email]> Sent: Thursday, June 15, 2017 4:36:51 PM To: [hidden email] Subject: Re: How to access resources file (css, js files from theme folder) and get link from FTL? Did you populate the database with your data and access it in the Header template of your theme? Are the static file links got rendered in your html? We'll need some more infor what you already did and what does not work concretely. Michael Am 15.06.17 um 11:31 schrieb Donhu Vy: > Thank Deepak Dixit about suggestion > > #VISUAL_THEME=TOMAHAWK VyDN > VISUAL_THEME=BOOTSTRAP > inside general.properries > > and thank to Michael Brohl. > > But I still can not load static files from own theme (although re-run gradlew cleanAll ofbiz) > > My wishing: https://user-images.githubusercontent.com/1328316/27174784-799b01b8-51e7-11e7-8356-d8a5197ebd5a.jpg > > Current reality: https://user-images.githubusercontent.com/1328316/27174770-6bc6c612-51e7-11e7-9a26-75fa43d75d48.jpg > > Help me fix this problem! > > > ________________________________ > From: Michael Brohl <[hidden email]> > Sent: Thursday, June 15, 2017 4:22:23 PM > To: [hidden email] > Subject: Re: How to access resources file (css, js files from theme folder) and get link from FTL? > > I added the default theme entry part in the stackoverflow answer, thanks > Deepak :-) > > Am 15.06.17 um 11:14 schrieb Deepak Dixit: >> 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<http://www.hotwaxsystems.com<http://www.hotwaxsystems.com<http://www.hotwaxsystems.com>> >> www.hotwax.co<http://www.hotwax.co> >> >> On Thu, Jun 15, 2017 at 2:40 PM, Donhu Vy <[hidden email]> 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 <[hidden email]> >>> Sent: Thursday, June 15, 2017 3:58:18 PM >>> To: [hidden email] >>> 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 ) >>>> >>> > > |
I think you have the wrong path in your load data.
The root for your files is /themes/bootstrap/webapp/bootstrap not /themes/bootstrap/webapp So you have to store /assets/js/additional-methods.min.js as your relative ressource path in the data. Regards, Michael Brohl ecomify GmbH www.ecomify.de Am 15.06.17 um 11:48 schrieb Donhu Vy: > Thank Michael Brohl, > > > After run > > gradle cleanAll loadDefault ofbiz > > (not gradle cleanAll ofbiz like early). > > > Loaded ok: https://user-images.githubusercontent.com/1328316/27175657-10955198-51ea-11e7-9ff7-c1ca1a44ec33.jpg > > But these are broken links: https://user-images.githubusercontent.com/1328316/27175679-1e5d8a5c-51ea-11e7-94fc-ec363e0ae329.jpg > > Help me access static resources files correctly (at this time, these are broken links). > > > ________________________________ > From: Michael Brohl <[hidden email]> > Sent: Thursday, June 15, 2017 4:36:51 PM > To: [hidden email] > Subject: Re: How to access resources file (css, js files from theme folder) and get link from FTL? > > Did you populate the database with your data and access it in the Header > template of your theme? > > Are the static file links got rendered in your html? > > We'll need some more infor what you already did and what does not work > concretely. > > Michael > > Am 15.06.17 um 11:31 schrieb Donhu Vy: >> Thank Deepak Dixit about suggestion >> >> #VISUAL_THEME=TOMAHAWK VyDN >> VISUAL_THEME=BOOTSTRAP >> inside general.properries >> >> and thank to Michael Brohl. >> >> But I still can not load static files from own theme (although re-run gradlew cleanAll ofbiz) >> >> My wishing: https://user-images.githubusercontent.com/1328316/27174784-799b01b8-51e7-11e7-8356-d8a5197ebd5a.jpg >> >> Current reality: https://user-images.githubusercontent.com/1328316/27174770-6bc6c612-51e7-11e7-9a26-75fa43d75d48.jpg >> >> Help me fix this problem! >> >> >> ________________________________ >> From: Michael Brohl <[hidden email]> >> Sent: Thursday, June 15, 2017 4:22:23 PM >> To: [hidden email] >> Subject: Re: How to access resources file (css, js files from theme folder) and get link from FTL? >> >> I added the default theme entry part in the stackoverflow answer, thanks >> Deepak :-) >> >> Am 15.06.17 um 11:14 schrieb Deepak Dixit: >>> 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<http://www.hotwaxsystems.com<http://www.hotwaxsystems.com<http://www.hotwaxsystems.com>> >>> www.hotwax.co<http://www.hotwax.co> >>> >>> On Thu, Jun 15, 2017 at 2:40 PM, Donhu Vy <[hidden email]> 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 <[hidden email]> >>>> Sent: Thursday, June 15, 2017 3:58:18 PM >>>> To: [hidden email] >>>> 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 ) >> > > smime.p7s (5K) Download Attachment |
Free forum by Nabble | Edit this page |