I forget to add some glyphicons here and there... Maybe in the next one...
@Ebenezer Obasi
First of all I 'd like to thank you for your contribution and your free plugins. I appreciate that. And congratulations for your personal website.
Now about glyph icons, I was thinking of various ways to use them in front of menu item labels.
One could be using Javascript .addclass method ( as you suggested above ).
Then I thought that another way to alternate a set of desired fontawasome class name values for each menu item could be using the {cycle} function- of Smarty's engine inside the template file itself:
- /public_html/ow_plugins/bootstrap/views/components/menu.html ( view file )
of your plugin. By supplying the 'assign' attribute, the output of the {cycle} function can be assigned to a template variable instead of being output to the template.
So I tried this , and seems to work fine for me :
<ul class="{$class} nav navbar-nav clearfix">
{foreach from=$data item='item'}
{cycle values='fa fa-home fa-fw,fa fa-th-list fa-fw, fa fa-users fa-fw, fa fa-camera-retro fa-fw, fa fa-video-camera fa-fw,fa fa-calendar fa-fw' assign='faclass'}
<li class="{$item.class}{if !empty($item.active)} active{/if}">
<a href="{$item.url}"{if $item.new_window} target="_blank"{/if}>
<i class="{$faclass}"></i>
<span>{$item.label}</span></a>
</li>
{/foreach}
</ul>
Of course having your Fontawsome plugin installed is essential.
Any other suggestions are welcome..