Log in

View Full Version : Home Icom as Tab


TheAdminMarket
11-08-2014, 05:55 AM
Hello,

I've a page landing as homepage and I want to avoid adding text like "Home" in Navigation manager but rather to use a Home icon like in my WP template at:
http://www.dimoslagada.com/

Is there anyway to do it?

Thank you

Zachery
11-08-2014, 06:52 AM
Edit the phrase, and make it an image, or edit the navigation manager entry and make it an image?

TheAdminMarket
11-08-2014, 07:26 AM
Edit the phrase, and make it an image, or edit the navigation manager entry and make it an image?

I think that I've tried this solution one year ago (then I gave up the idea), and if I remember well it was working half the way. What I mean. There are 2 icons. One for active tab and a second one (grey out) for inactive tab. It was always showing one icon.

But thanks to your suggestion I just got an idea. As it will be just for my site I can modify the template and add something like:

<vb:if condition="THIS_SCRIPT == '.....'">
<img border="0" src="active.png">
<vb:else />
<a href="..."><img border="0" src="inactive.png"></a>
</vb:if>

I've a feeling that it will works.

Thank you !!

--------------- Added 1415464398 at 1415464398 ---------------

Well, I was able to add it on the way that I said before, but my try to make it professional using the Plugin system currently stucks.

I want to place it on the hook: navtab_start but seems that using as hookname: navigation_tab_complete is not the right one.

My code (in the xml file) is:

<plugin active="1" executionorder="90">
<title>Index: Home Tab</title>
<hookname>navigation_tab_complete</hookname>
<phpcode><![CDATA[
$template_hook['navtab_start'] .= vB_Template::create('index_hometab')->render();
]]></phpcode>
</plugin>

and the template code (which works when I'm adding it manually) is:

<template name="index_hometab" templatetype="template" date="" username="" version="1.0.0">
<![CDATA[
<vb:if condition="THIS_SCRIPT == 'index'">
<img border="0" src="images/portal/misc/navhome_active.png" style="float:left;">
<vb:else />
<a href=""><img border="0" src="images/portal/misc/navhome_inactive.png" style="float:left;"></a>
</vb:if>
]]></template>


Anyone can catch the bug?