Stumped - trying to automate accordion sitemap referencing tabbed multi-listings from other pages

17 posts by 5 authors in: Forums > CMS Builder
Last Post: April 25, 2011   (RSS)

By meg - April 21, 2011

Attached are two files, who have the same records, but different results once live. Essentially, I'm trying to develop an automated breadcrumb using this tab navigation that I have set up.

The code in question is line 140 in about1.php and line 131 in program1.php, both in the "<div id="breadcrumb">"

To see the different numeric results with the database, go to: emeritihealth.org/about1.php and emeritihealth.org/program1.php

Note that the "about" page lists the numbers properly, while the "program" page doesn't. I added entries to the "program" page later and changed the order, unlike the "about" page, so that's why I'm thinking the numeric order has to do with creation date or date modified, rather than sequential order in the CMS.
Attachments:

about1.php 8K

program1.php 7K

Re: [meg] Stumped - trying to automate accordion sitemap referencing tabbed multi-listings from other pages

By Jason - April 21, 2011

Hi Meg,

I've been taking a look into this issue. If I look at about1.php for example, I can see where you're outputting a link manually that links to about.php. On about.php, I see the "tabbed" breadcrumb that uses javascript.
How is that being created? What is different between about.php and about1.php? Could you attach a copy of about.php so I can compare?

If you could help to clarify the issue you're experiencing, I can look into this further.

Thanks
---------------------------------------------------
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] Stumped - trying to automate accordion sitemap referencing tabbed multi-listings from other pages

By meg - April 21, 2011

Oh right now, in about.php, I'm manually updating the breadcrumbs in a WYSIWYG within the CMS form. I just started development to automate the breadcrumb in the about1.php but I got stumped when I wasn't able to generate a correct numeric value for the sequential order of the multi-listings that make up the accordion menu and tab navigation. When I used the <?php echo $record['num'] ?> in about1.php, it did properly generate the sequential numbers I was looking for, but when I tried implementing it on the other tabbed pages on the website, like the program1.php (a test URL), I did not get the same results. (You can also see it within the individuals1.php and the institutions1.php) The only reason I can gather this is occurring is because it's using the creation date to generate this numeric values, rather than the sequential order as it appears in the multi-listing within the CMS. Do I need to modify the Order By value to get this to work properly or do you have another solution or suggestion?

Re: [meg] Stumped - trying to automate accordion sitemap referencing tabbed multi-listings from other pages

By Jason - April 21, 2011

Hi Meg,

The "num" field is a automatically generated sequential value created when you first create the record. The issue with using this field is that you can end up with blank spaces, for example, if you create a record with a num of 3, then delete it, the next record you create will have a num of 4. Each number is only ever used once in a section. Also, depending on how you're sorting your records, you can't guarantee that your "nums" will be in sequential order.

Does the sequential number have to be related to what's actually stored in that record, or do you just need to be able to create a list of sequential numbers? If it's the latter, you can just use a count variable.

For example:

<?php $count = 0;?>
<?php foreach ($records as $record): ?>
<?php $count ++; ?>

...

<?php endforeach?>


In this example, each time through the loop, count will have the next number (ie, 1, 2, 3, 4...)

Does this help?
---------------------------------------------------
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] Stumped - trying to automate accordion sitemap referencing tabbed multi-listings from other pages

By meg - April 21, 2011

Ok, I'm a little confused on how to integrate this option you're providing. So this just generates a string of sequential numbers that aren't associated with the records? Please explain.

Re: [meg] Stumped - trying to automate accordion sitemap referencing tabbed multi-listings from other pages

By Damon - April 25, 2011

Hi Meg,

Can you send in a Support Request with all the site details?
https://www.interactivetools.com/support/email_support_form.php?priority=free
(you don't need to enter an order number)

Then we can see the actual content that is being displayed which will make troubleshooting much easier and quicker.

Please be sure to include:
- CMS Builder login details
- FTP details
- link to this forum thread for reference - http://www.interactivetools.com/forum/gforum.cgi?post=87657
- and any other details that will help.

Note: don't post any login or FTP details in the forum.
Cheers,
Damon Edis - interactivetools.com

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