I need to place icon in front of link on the left nav bar

Helen Lubar Posted in Component Development 5 years ago

I am trying to place an icon in front of a link on the left side bar.
Made the component but just got this ">" Component"
Some of the links use font awesome but I cant'seem to achieve that.

Can it be achieved in the file ossn_com.php and how.

Replies
us Helen Lubar Replied 5 years ago

Thank you Arsalan, very clear and precise.

Indonesian Arsalan Shah Replied 5 years ago

Perhaps you need to edit the css file \themes\goblue\plugins\default\css\core\default.php now when you added new menu using a correct way (component) if you see the source code of menu you will find a unique class assigned to the menu. For example the group have class .menu-section-item-groups

OSSN using fontawesome 4.3.0 you can assign the icon to the menu item just like it is assigned to groups :

.menu-section-item-groups:before {
    content: "\f07b" !important
}

Here \f07b it is the icon code from fontawesome 4.3.0 , for example If you see https://fontawesome.com/v4.7.0/icons/ and click on any icon you will see Unicode thing, which is actually

content: "\Unicode" !important;
us Rishi B Replied 5 years ago

Not an intelligent question!

Lol. But seriously, if you can get the functionality working (for example, by directly editing the file I suggested, or similar ones), it shouldn't be difficult to package it as a component. You can find an example of how to do that by looking at the HelloWorld component.

us Helen Lubar Replied 5 years ago

Not helpful!

us Rishi B Replied 5 years ago

you might have an easier time just editing theme/plugins/default/theme/page/elements/topbar.php