
theclicklab
User
Jan 7, 2012, 1:59 PM
Post #1 of 2
(215 views)
Shortcut
|
|
Breadcrumb when no record number in URL
|
Can't Post
|
|
Hi there, I'm having an issue getting a breadcrumb working - I think its due to the fact that I don't have the record number in the url? Page URL's are formatted as: www.xyz.com/abc/ Here's the code:
// load breadcrumbs list($breadcrumbRecords, $selectedCategory) = getCategories(array( 'tableName' => 'pages', // REQUIRED 'categoryFormat' => 'breadcrumb', // showall, onelevel, twolevel, breadcrumb )); <div class="breadcrumb"> <a href="/">Home</a> <?php foreach ( $breadcrumbRecords as $breadcrumb ): ?> › <?php if ( $breadcrumb['num'] != getLastNumberInUrl() ): ?><a href="/<?php echo strtolower($breadcrumb['url']); ?>/"><?php endif ?> <?php echo $breadcrumb['name']; ?> <?php if ( $breadcrumb['num'] != getLastNumberInUrl() ): ?></a><?php endif ?> <?php endforeach ?> </div> Any suggestions? Many thanks ~~~~~~~~~~~~~~~~~~ Jan Dunlop theClickLab.com nz.linkedin.com/in/jandunlop ~~~~~~~~~~~~~~~~~~
|