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
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: [dccreatives] Simple Breadcrumbs
By Jason - April 16, 2010
Making breadcrumbs can be bit tricky. One thing you could do is on the page, have variables that capture the current product, type, brand, and item being displayed.
Then, you could output each if there is something in the variable. For example:
<?php if($product) : ?>
<a href="search.php?product=<?php echo $product ?>"><?php echo $product ?> >> </a>
<?php endif ?>
<?php if($type) : ?>
<a href="search.php?product=<?php echo $product ?>&type=<?php echo $type ?>"><?php echo $type ?> >> </a>
<?php endif ?>
....etc
That way you build up the string of links, adding an extra variable for each one.
Try something like that. Let me know how it goes.
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
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.
Re: [dccreatives] Simple Breadcrumbs
By Jason - April 19, 2010
$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
Re: [dccreatives] Simple Breadcrumbs
By Jason - April 19, 2010
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
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.
Re: [dccreatives] Simple Breadcrumbs
By Jason - April 19, 2010
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
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
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/