Simple Breadcrumbs

17 posts by 2 authors in: Forums > CMS Builder
Last Post: April 22, 2010   (RSS)

By dccreatives - April 15, 2010 - edited: April 15, 2010

Need help making breadcrumbs to display data like this:

Products >>Type >>Brands >> Items

with the following Data fields that I have:
Products (Menu Group)
Type (Multi)
Brand(Multi)
Items(Multi)


Products menugroup products (0)[/#666666] modify erase [img]http://lib/images/drag.gif[/img]
Type multi type (2)[/#666666] modify erase [img]http://lib/images/drag.gif[/img]
Brands multi brands (3)[/#666666] modify erase [img]http://lib/images/drag.gif[/img]
Items multi items (10)[/#666666] [url "http://www.interactivetools.com/forum/forum.cgi?url=http%3A%2F%2F%3Fmenu%3Ddatabase%26action%3DeditTable%26tableName%3Ditems"]modify[/#0066cc][/url] [url "http://www.interactivetools.com/forum/forum.cgi?url=http%3A%2F%2Fjavascript%3AconfirmEraseTable27items29"]erase[/#0066cc][/url]

Re: [Jason] Simple Breadcrumbs

When I did that I got the following message:

Notice: Undefined variable: products in /services/webpages/a/x/axislighting.com/public/CMS/diaHome.php on line 100 Notice: Undefined variable: types in /services/webpages/a/x/axislighting.com/public/CMS/diaHome.php on line 102

http://www.axislighting.com/CMS/diaHome.php?Dia1

Since my type and product tables are called types and products I modified the code to match.

Here is the attachment.
Attachments:

diahome_002.php 11K

Re: [dccreatives] Simple Breadcrumbs

By Jason - April 19, 2010

Hi,

$products is an undefined variable. This means you are trying to access the variable without ever giving it a value. You need to first give $products a value, either product name, or product number that you are currently using on that page.

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] Simple Breadcrumbs

I realized that when I got the error. What I am never sure of is how I define a variable on a page, and also how do I prevent it from showing that I defined it there? Is there a way to define it in a hidden field?

Re: [dccreatives] Simple Breadcrumbs

By Jason - April 19, 2010

How you define the variable depends on how your page is getting information. So, for this page, how do you know what product you're displaying? Does it come from a submitted form, from the database, or from the user clicking on a link? How are you passing that information to your page?

For example, if the user clicked a link to get to that page, are you storing a product name in the url like this:
diaHome.php?product_name="PRODUCT"

If you, you can capture it with this line:
$product=$_REQUEST['product_name'];

If you can give me some more details on how this information is passed, I can help you get this figured out.

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] Simple Breadcrumbs

I need you to please be more specific with syntaxes. I am new to this program and I am having a hard time customizing my pages. This page diaHome.php is the Brand page for my items. It will be passed through linking. Someone comes to this page through clicking on Type (table name: types) then Brand (table name: brands) That is the DiaHome.php breadcrumbs. Then they will click on the Dia items (table name: items),

Can you provide me with how to define the variables (complete syntax) and how to make these shortcuts.

I am attaching the page DiaHome.php

Thank You.
Attachments:

diahome_003.php 11K

Re: [dccreatives] Simple Breadcrumbs

By Jason - April 19, 2010

Hi,

Sorry this is taking awhile. I think we may misunderstanding each other. Originally you posted this format for your breadcrumbs:

Products >>Type >>Brands >> Items

With each of these being a link a user could click on. Now, what exactly would you want to happen when a user clicked on one of these? For example, if the user clicked on Type, would they see a list of all brands, or just the brands associated with a certain type?

What are the names of the pages you want these to link to (Products.php, type.php?)?

Last, what are the names of the different fields found in
Type
Brand
Items.

Sorry again for the delay, but having all of this information will be important in designing a solution.
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] Simple Breadcrumbs

Products will not really be a link. Type should take you to typesList.php. Brands should take you to brandsList.php and Item should not link, but should pull the name of the current item.

I did notice that my typesList.php is not really working. It lists the types I have like Recessed and Direct/Indirect, but is not associating the items that I assigned to it. In items, I created a list menu called type and it calls the types that I have listed under that field, and I selected the appropriate one.

While I assigned every item to a type via the dropdown in the section editor, the typesDetail.php is not showing any product items. I am not sure why.



In either case, Brands so far have Dia, Plano, Wave (only Dia is activated so far). Types has Direct/Indirect and Recessed. Items Have Dia 1x1, Dia 1x4, Dia 2x4 and others.

Re: [dccreatives] Simple Breadcrumbs

By Jason - April 20, 2010

Hi,

Okay, maybe you can attach your files. I'll also need a list of the fields that you would find in the item section. This will be important to design a solution.

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/