| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Adding font-awesome icons to category sidebar | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Adding font-awesome icons to category sidebar & labels
Hello,
What would be the best way to add font-awesome icons to the names of my category pages that are listed in the sidebar? Would this require making a custom module? For example, say I had a category 'Settings'. I'd much rather have a gear icon before the actual wording. Using 5.3.4.7 on Standard theme. |
|||||||
#2
|
|||||||
|
|||||||
Re: Adding font-awesome icons to category sidebar & labels
This is also a problem with the Label editor.
Please see my screenshot attached. It works fine while in the editor, then as soon as you X out and refresh the page, it renders incorrectly. https://i.imgur.com/jCaERG4.jpg |
|||||||
#3
|
|||||||||
|
|||||||||
Re: Adding font-awesome icons to category sidebar & labels
Quote:
I believe FontAwesome is already enabled in the standard theme, so you can use the following markup to add FontAwesome icons (change the "fa-arrow-right" class to yours): HTML Code:
Quote:
As far as I see the template that displays the block does not accept HTML tags: skins/customer/modules/XC/NewsletterSubscriptions/form/parts/form.twig HTML Code:
However, you can enable the webmaster mode and edit the template as follows: HTML Code:
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions Last edited by qualiteam : 05-07-2018 at 02:49 AM. |
|||||||||
#4
|
|||||||
|
|||||||
Re: Adding font-awesome icons to category sidebar & labels
Quote:
Quote:
|
|||||||
#5
|
|||||||||
|
|||||||||
Re: Adding font-awesome icons to category sidebar & labels
Quote:
This requires creating a custom module. First, you should add a new field to the category model class. Model classes are discussed here: https://devs.x-cart.com/basics/understanding_models.html But you don't create a new module. Instead, you add a new field to an existing model class. To do so you should not just "extend" and existing class, but "decorate" it by adding "implements \XLite\Base\IDecorator". You may also check an article explaining how to add an extra field to the existing OrderItem model class. Adding the field to the UI may tricky, though.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#6
|
|||||||||
|
|||||||||
Re: Adding font-awesome icons to category sidebar
I've moved the question about adding a new category field into its own forum thread:
https://forum.x-cart.com/showthread.php?t=76178
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|