flipflopmedia Posted May 30, 2010 Share Posted May 30, 2010 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 0 Quote Link to comment Share on other sites More sharing options...
HerrZ Posted May 31, 2010 Share Posted May 31, 2010 see here how dirty the breadcrum ist generated on a custom page: http://wiki.whmcs.com/Creating_Pages i dont know how it works on the core pages, but the only way to change the breadcrumb is preg_replace. i think. do it on hook ClientAreaPage and use global $smarty. 0 Quote Link to comment Share on other sites More sharing options...
flipflopmedia Posted May 31, 2010 Author Share Posted May 31, 2010 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 0 Quote Link to comment Share on other sites More sharing options...
flipflopmedia Posted June 6, 2010 Author Share Posted June 6, 2010 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} 0 Quote Link to comment Share on other sites More sharing options...
Jaggl Posted September 14, 2012 Share Posted September 14, 2012 yeah i know... old thread.. but THX! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.