Hi!
This ought to be good for some interesting conversation! OK, I am a Newbie but this is a little advanced for me.
I have tried a couple of different php scripts for building breadcrumbs and they never breadcrumb the page I want, so I have taken different approach.
This works:
<div class="bredcrumbs">
<ul> <!-- Add more links as needed with links to page and page name -->
<li><a href="index.php">Home</a></li>
<!--print section name-->
<li><a href="#"><?php echo $section ?></a></li>
<!--print sub section if there is a name-->
<?php if($sub_sec !== " ") {?>
<li><a href="#"><?php {echo $sub_sec; } ?></a></li>
<?php } ?>
<!--print page name-->
<li><a href="#"><?php echo $page_name ?></a></li>
</ul>
</div>
I get the crumbs perfectly. I have set up variables on each page for $section, $sub_sec and $page_name, BUT, here's the fun part...getting the url for that particular sub section or section.
What I am thinking is to give each section & sub section a URL variable.
Example:
$section = 'Accounts'
$secURL = (insert section url here)
$sub_sec = 'Users'
$subURL = (insert sub section url here)
Then inside the code I showed above, I would add the $secURL to the $section and the $subURL to the $sub_sec. Does that even make sense?
What do you think? Is this even possible? And how is it done?
Thanks you guys! Have a good one!!
Lisa
😉