View Single Post
  #10  
Old 12-15-2006, 12:53 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Speed bar plus add-on

Ok, Advanced Speedbar for Dummies:

This line:
Code:
<li {if $main eq "catalog" && $current_category.category eq ""}id="current"{/if}><a href="home.php" title="Home"><span>Home</span></a></li>
is hard coded for "home"

This line:
Code:
{if $login eq ""} <li {if $main eq "register"}id="current"{/if}><a href="register.php" title="{$lng.lbl_register}"><span>{$lng.lbl_register}</span></a></li> {/if}
is hard coded to register

This line:
Code:
<li {if $main eq "cart" && $smarty.get.mode ne "checkout"}id="current"{/if}><a href="cart.php" title="{$lng.lbl_view_cart}"><span>{$lng.lbl_view_cart}</span></a></li>
is hard coded to view cart

This line:
Code:
<li {if $smarty.get.mode eq "checkout"}id="current"{/if}><a href="cart.php?mode=checkout" title="{$lng.lbl_checkout}"><span>{$lng.lbl_checkout}</span></a></li>
Is hard coded to "checkout"

Now here comes the good stuff:
Code:
{section name=sb loop=$speed_bar} {if $speed_bar[sb].active eq "Y"} <li {if $speed_bar[sb].orderby eq $page_data.orderby}id="current"{/if}> <a href="{$speed_bar[sb].link}" title="{$speed_bar[sb].title}"><span>{$speed_bar[sb].title}</span></a></li> {/if} {/section}
This parses the static embedded pages you defined in "speedbar" section of admin.

The reason my speedbar is in the left, is that my CSS tells it to go there (actually, it doesn't tell it to go right, so it doesn't).

In head.tpl

Code:
<tr class="HeadLine" ><td>{ include file="speedbar/speedbar.tpl" }</td>

In skin1.css
Code:
.HeadLine { padding: 0px; background: #C4E9EB; color: #fff; margin: 0px 0px 0px 0px }

If you are using a stock install, you need to do some fishing/hunting/webmaster mode, and find out where the old speedbar lives, and make it go away.

It may be in top_menu.tpl -- and it uses way too much code to make the tabs...

Remember, the {section} loop parses the embedded pages from speedbar in the admin. It's not complicated once you get your head around it.

If you want, post your speedbar.tpl, and I'll try to slice it up for you.

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote