Breadcrumb Implementation

25 posts by 4 authors in: Forums > CMS Builder
Last Post: October 22, 2012   (RSS)

By Jason - October 18, 2012

Hi Ragi,

One thing you can do is append a record number to the end of your URL. This should then get picked up by getCategories and make a $selectedRecord variable available to you.

For example:
<a href="<?php echo $categoryRecord['url'] ?>?<?php echo $categoryRecord['num'];?>" rel="self"><?php echo $categoryRecord['name'] ?></a>

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Breadcrumb Implementation

By northernpenguin - October 18, 2012 - edited: October 18, 2012

Jason: This is weird. The menu works properly except for the Home page, where is displays "Record not found!". All other menu entries work properly.

As for the breadcrumb trail, here is what I am using:
<ul>

<li><?php @$selectedCategory['breadcrumb']; ?></li>

</ul>

and it still outputs nothing.

I also tried:


Ragi<ul>
<?php if ($categoryRecord['_isSelected']): ?>
<li><?php echo $categoryRecord['name']; ?></li>
<?php endif; ?>
</ul>

Still nothing.
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [Jason] Breadcrumb Implementation

Jason: Correct me if I'm wrong, but from what I am looking at here is what I must be able to do in order to display the correct breadcrumb trail:

Based on the current 'num', lookup 'lineage'. 'lineage' stores the complete breadcrumb trail as follows (ex): ":1:2:47"

That means I have to parse the value of 'lineage' and display record num = 1 > num = 2 > num =47 using the 'title'.

Does that make sense?

Ragi
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

By Jason - October 19, 2012

Hi Ragi,

The breadcrumb field does do a bit of this work for you it will give you a separated string of names, based on lineage. It includes itself at the end, so you would get a breadcrumb value that looked similar to this:


About the League : Chairperson's Message :Chairperson's Biography

The issue, however, is that you are getting no record for $selectedCategory, so there is nothing to output. If you could send in a [url http://www.interactivetools.com/support]2nd Level support[/url] request, I can take a quick look at what is going on. If no obvious solution presents itself, this may be something we can help you out with through consulting.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/