Breadcrumb Implementation
25 posts by 4 authors in: Forums > CMS Builder
Last Post: October 22, 2012 (RSS)
<ul>
<?php foreach ($categoryRecords as $categoryRecord): ?>
<?php echo $categoryRecord['_listItemStart'] ?>
<?php if ($categoryRecord['_isSelected']): ?>
<?php endif; ?>
<?php if ($categoryRecord['open_in_new_page'] == "1"): ?>
<b><a href="<?php echo $categoryRecord['url'] ?>" rel="self" target="_blank"><?php echo $categoryRecord['name'] ?></a></b>
<?php else: ?>
<a href="<?php echo $categoryRecord['url'] ?>" rel="self"><?php echo $categoryRecord['name'] ?></a>
<?php endif; ?>
<?php if ($categoryRecord['_isSelected']): ?>
<?php endif; ?>
<?php echo $categoryRecord['_listItemEnd'] ?>
<?php endforeach; ?>
</ul>
Any ideas?
Ragi
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Re: [northernpenguin] Breadcrumb Implementation
I notice you have two <?php if ($categoryRecord['_isSelected']): ?> statements with nothing in them. Do you need to delete one of these and wrap the <?php if ($categoryRecord['open_in_new_page'] == "1"): ?> statement in one of them?
Thanks
PHP Programmer - interactivetools.com
Re: [greg] Breadcrumb Implementation
What I would like to do is use the menu titles in this section editor to generate the breadcrumb trail.
Ragi
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Re: [northernpenguin] Breadcrumb Implementation
Now I understand what the empty if statements are for!
Something like this should output the breadcrumbs for the selected category for you:
<?php if ($categoryRecord['_isSelected']): ?>
<p><?php echo $categoryRecord['breadcrumb'] ; ?></p>
<?php endif; ?>
Let me know if this isn't what your looking for.
Thanks.
PHP Programmer - interactivetools.com
Re: [greg] Breadcrumb Implementation
By northernpenguin - October 15, 2012 - edited: October 15, 2012
BTW, where does the field name "breadcrumb" come from? I don't use it anywhere in my code.
Ragi
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Re: [northernpenguin] Breadcrumb Implementation
By rconring - October 16, 2012 - edited: October 16, 2012
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987
Re: [rconring] Breadcrumb Implementation
Now, I wonder why it doesn't print anything?
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Re: [northernpenguin] Breadcrumb Implementation
By rconring - October 16, 2012
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987
Re: [northernpenguin] Breadcrumb Implementation
Thanks!
PHP Programmer - interactivetools.com
Re: [greg] Breadcrumb Implementation
Thanx
Ragi
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke