Hi Aditya,
I think instead of adding a name in Theme file and concat the sizes while rendering, we can add a new property for each size icon. e.g VT_SHORTCUT_ICON_32,VT_SHORTCUT_ICON_64 etc. Thanks & Regards -- Deepak Dixit On Fri, Aug 24, 2018 at 2:48 PM, <[hidden email]> wrote: > Author: adityasharma > Date: Fri Aug 24 09:18:59 2018 > New Revision: 1838797 > > URL: http://svn.apache.org/viewvc?rev=1838797&view=rev > Log: > Improved: Change the uggly favicon with the new one ! | Using new OFBiz > logo > (OFBIZ-10522) > Updated the icon for the ecommerce. > > Modified: > ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl > ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml > > Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/ > HeaderHead.ftl > URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ > ecommerce/template/includes/HeaderHead.ftl?rev=1838797&r1= > 1838796&r2=1838797&view=diff > ============================================================ > ================== > --- ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl > (original) > +++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl > Fri Aug 24 09:18:59 2018 > @@ -34,7 +34,12 @@ under the License. > <#assign shortcutIcon = layoutSettings.shortcutIcon/> > </#if> > <#if shortcutIcon?has_content> > - <link rel="shortcut icon" href="<@ofbizContentUrl>${ > StringUtil.wrapString(shortcutIcon)}</@ofbizContentUrl>"/> > + <link rel="shortcut icon" href="<@ofbizContentUrl>${ > StringUtil.wrapString(shortcutIcon)+".ico"}</@ofbizContentUrl>" > type="image/x-icon"> > + <link rel="icon" href="<@ofbizContentUrl>${StringUtil.wrapString( > shortcutIcon)+".png"}</@ofbizContentUrl>" type="image/png"> > + <link rel="icon" sizes="32x32" href="<@ofbizContentUrl>${ > StringUtil.wrapString(shortcutIcon)+"-32.png"}</@ofbizContentUrl>" > type="image/png"> > + <link rel="icon" sizes="64x64" href="<@ofbizContentUrl>${ > StringUtil.wrapString(shortcutIcon)+"-64.png"}</@ofbizContentUrl>" > type="image/png"> > + <link rel="icon" sizes="96x96" href="<@ofbizContentUrl>${ > StringUtil.wrapString(shortcutIcon)+"-96.png"}</@ofbizContentUrl>" > type="image/png"> > + <#--<link rel="shortcut icon" href="<@ofbizContentUrl>${ > StringUtil.wrapString(shortcutIcon)}</@ofbizContentUrl>"/>--> > </#if> > <#if layoutSettings.styleSheets?has_content> > <#--layoutSettings.styleSheets is a list of style sheets. So, you can > have a user-specified "main" style sheet, > > Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml > URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ > ecommerce/widget/Theme.xml?rev=1838797&r1=1838796&r2=1838797&view=diff > ============================================================ > ================== > --- ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml (original) > +++ ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml Fri Aug 24 > 09:18:59 2018 > @@ -37,7 +37,7 @@ under the License. > <property name="VT_STYLESHEET['add']" value="/contentimages/css/ > contentForum.css"/> > <!--header image --> > <property name="VT_HDR_IMAGE_URL" value="/images/ofbiz_logo.png" > /> > - <property name="VT_SHORTCUT_ICON" value="/images/ofbiz.ico"/> > + <property name="VT_SHORTCUT_ICON" value="/images/favicon"/> > <!--template location--> > <property name="VT_HDR_TMPLT_LOC" value="component://ecommerce/ > template/includes/Header.ftl"/> > <property name="VT_FTR_TMPLT_LOC" value="component://ecommerce/ > template/includes/Footer.ftl"/> > > > |
Thanks Deepak for the suggestions.
Intializing variables once & using it on all page loads seems a better proposition than concatenation on each page load. I have added this comment on OFBIZ-10522 <https://issues.apache.org/jira/browse/OFBIZ-10522>. I will wait for inputs from Julien before I update. Thanks and Regards, *Aditya Sharma* | Enterprise Software Engineer HotWax Commerce <http://www.hotwax.co/> by HotWax Systems <http://www.hotwaxsystems.com/> [image: https://www.linkedin.com/in/aditya-p-sharma/] <https://www.linkedin.com/in/aditya-p-sharma/> On Fri, Aug 24, 2018 at 3:57 PM Deepak Dixit <[hidden email]> wrote: > Hi Aditya, > > I think instead of adding a name in Theme file and concat the sizes while > rendering, we can add a new property for each size icon. > e.g VT_SHORTCUT_ICON_32,VT_SHORTCUT_ICON_64 etc. > > Thanks & Regards > -- > Deepak Dixit > > > On Fri, Aug 24, 2018 at 2:48 PM, <[hidden email]> wrote: > > > Author: adityasharma > > Date: Fri Aug 24 09:18:59 2018 > > New Revision: 1838797 > > > > URL: http://svn.apache.org/viewvc?rev=1838797&view=rev > > Log: > > Improved: Change the uggly favicon with the new one ! | Using new OFBiz > > logo > > (OFBIZ-10522) > > Updated the icon for the ecommerce. > > > > Modified: > > ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl > > ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml > > > > Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/ > > HeaderHead.ftl > > URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ > > ecommerce/template/includes/HeaderHead.ftl?rev=1838797&r1= > > 1838796&r2=1838797&view=diff > > ============================================================ > > ================== > > --- ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl > > (original) > > +++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl > > Fri Aug 24 09:18:59 2018 > > @@ -34,7 +34,12 @@ under the License. > > <#assign shortcutIcon = layoutSettings.shortcutIcon/> > > </#if> > > <#if shortcutIcon?has_content> > > - <link rel="shortcut icon" href="<@ofbizContentUrl>${ > > StringUtil.wrapString(shortcutIcon)}</@ofbizContentUrl>"/> > > + <link rel="shortcut icon" href="<@ofbizContentUrl>${ > > StringUtil.wrapString(shortcutIcon)+".ico"}</@ofbizContentUrl>" > > type="image/x-icon"> > > + <link rel="icon" href="<@ofbizContentUrl>${StringUtil.wrapString( > > shortcutIcon)+".png"}</@ofbizContentUrl>" type="image/png"> > > + <link rel="icon" sizes="32x32" href="<@ofbizContentUrl>${ > > StringUtil.wrapString(shortcutIcon)+"-32.png"}</@ofbizContentUrl>" > > type="image/png"> > > + <link rel="icon" sizes="64x64" href="<@ofbizContentUrl>${ > > StringUtil.wrapString(shortcutIcon)+"-64.png"}</@ofbizContentUrl>" > > type="image/png"> > > + <link rel="icon" sizes="96x96" href="<@ofbizContentUrl>${ > > StringUtil.wrapString(shortcutIcon)+"-96.png"}</@ofbizContentUrl>" > > type="image/png"> > > + <#--<link rel="shortcut icon" href="<@ofbizContentUrl>${ > > StringUtil.wrapString(shortcutIcon)}</@ofbizContentUrl>"/>--> > > </#if> > > <#if layoutSettings.styleSheets?has_content> > > <#--layoutSettings.styleSheets is a list of style sheets. So, you can > > have a user-specified "main" style sheet, > > > > Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml > > URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ > > ecommerce/widget/Theme.xml?rev=1838797&r1=1838796&r2=1838797&view=diff > > ============================================================ > > ================== > > --- ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml (original) > > +++ ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml Fri Aug 24 > > 09:18:59 2018 > > @@ -37,7 +37,7 @@ under the License. > > <property name="VT_STYLESHEET['add']" value="/contentimages/css/ > > contentForum.css"/> > > <!--header image --> > > <property name="VT_HDR_IMAGE_URL" value="/images/ofbiz_logo.png" > > /> > > - <property name="VT_SHORTCUT_ICON" value="/images/ofbiz.ico"/> > > + <property name="VT_SHORTCUT_ICON" value="/images/favicon"/> > > <!--template location--> > > <property name="VT_HDR_TMPLT_LOC" value="component://ecommerce/ > > template/includes/Header.ftl"/> > > <property name="VT_FTR_TMPLT_LOC" value="component://ecommerce/ > > template/includes/Footer.ftl"/> > > > > > > > |
Free forum by Nabble | Edit this page |