Jump to content

Add to breadcrumb nav?


Recommended Posts

First I have my breadcrumb nav set up like so:

 

<span class="heading">You are here:</span><br style="margin-bottom: 20px;" />

<a href="http://www.flipflopmedia.com/NewSite/">Home</a> >

{if $breadcrumbnav =='<a href="cart.php">Shopping Cart</a>'} <a href="http://clients.flipflopmedia.com/index.php">Support Portal</a> > {/if}

{$breadcrumbnav|regex_replace:"/[_]/":"-"}

</p>

 

Now it looks and works how I like, with a fix for cart.php page.

 

My problem, I have removed the download link from the Portal Page, and added it to the sidebar area so that's it's only viewable if logged in. When I go to the downloads page, the breadcrumb nav still reads Home > Support Portal > Downloads.

 

How do I make it read:

Home > Support Portal > Client Area > Downloads. ???

 

Any idea? I don't know what I'm doing obviously, because I cannot seem to fix it! :(

 

Tracy

Link to comment
Share on other sites

Thanks, but if I knew anything about hooks 'n $smarty, I'd probably have it figured out.

 

It's got something to do with regex expressions, I'm assuming. Like the code I pasted above. If you look at the WHMCS Demo and click on Cart, the navigation only reads Shopping Cart. With what I have, it now displays the previous page, as it should have to begin with. So knowing that can be easily done, I figure adding Client Area before Downloads in the navigation should be just as easy.... for someone anyway, not easy for me to figure out because I'm not familiar with regex.

 

Thanks,

Tracy

Link to comment
Share on other sites

Got it! And I owe you a Thank You, because I read and read and reread what you wrote and finally, finally, looked into $smarty. I couldn't understand why my if statements where effecting everything and not 'if this' 'do this'. Anyway, here's how I have my navigation setup now.

 

My cart.php page still reads: Home > Support Portal > Shopping Cart

 

All the other pages read correctly for the navigation.

 

AND:

 

I finally got 'Client Area' to show before 'Downloads' in the navigation (because that is not a direct link in my Portal and only accessible if logged in, so now the navigation reads: Home > Support Portal > Client Area > Downloads.

 

<span class="heading">You are here:</span><br style="margin-bottom: 20px;" /><a href="http://www.flipflopmedia.com/NewSite/">Home</a> >

{if $filename eq 'downloads'} <a href="http://clients.flipflopmedia.com/index.php">Support Portal</a> > <a href="http://clients.flipflopmedia.com/clientarea.php">Client Area</a> > <a href="http://clients.flipflopmedia.com/downloads.php">Downloads</a>

{elseif $filename eq 'cart'} <a href="http://clients.flipflopmedia.com/index.php">Support Portal</a> > <a href="http://clients.flipflopmedia.com/cart.php">Shopping Cart</a>

{else}

{$breadcrumbnav}

{/if}

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated