Hello,
I am starting to develop a new expression engine website for a chemical company and
will like some advice on using categories, as to be honest I do not have much experience using.
I’ll explain what I want to accomplish.
The company have 5 divisions selling different products, but sometimes some of the products can be found in more than one division.
Products belong to diferent categories, to give an example: cleaners, sanitizers, surface protection, etc.
what I want is to do is a grid of categories, in which each one expands to show the products belonging to that category.
Here is an image to help visualize what I mean. The css/javascript and html are working fine at this point, so I am in the part of translating this to EE code.
https://dl.dropbox.com/u/4138955/drop3d/web/site_example_v001.JPG
On that example I took one of the “categories” and circled it in red to show what I mean.
——-
So this is what I did:
a)Created a channel and called it “food_and_beverage_products_page” (this is meant to represent one of the five divisions).
b)Created a Field group with custom fields for that channel (product name, description, image, etc)
c)related the field groups with the channel
d)Created a new category group called “Food and Beverage Products”
e)created categories for that group, example: cleaners, sanitizers, surface protection, etc.
So hoping I haven’t mixed you up until this point. What I ll like to do is to dynamically
generate a category group (like the one circled in red in the image) and add products to that category (again like the image).
things I am not sure how to do.
1) How can I reuse a new product entry into a different category, lets say a product belongs to several categories.
2) can I contain a category inside a channel tag? if so, how can I specify the exact category group, and the specific category inside this group I want to populate?
3) can a div be dynamically generated on top of another such as an inline element would do, how can I wrap up the content, right now I have one chunk for the categories and one for the products channel, but both need to be generated at the same time.
Currently my code looks like this:
<div class="toggle">
<h5 class="toggle_title">
{exp:channel:categories channel="food_and_beverage_products_page" style="linear" show_empty="yes"}
{category_name}
{/exp:channel:categories}
</h5>
<div class="toggle_content">
<ul class="productfeatures">
{exp:channel:entries channel="food_and_beverage_products_page" disable="member_data" orderby="title" sort="asc"}
<li><a href="http://{product_link}">{product_name}</a></li>
{/exp:channel:entries}
</ul>
</div>
</div>And here is another image showing it more graphically (sorry for the crappy drawing, but thought it might help to get it clear 😊
https://dl.dropbox.com/u/4138955/drop3d/web/site_example_v002.JPG
Thanks in advanced for your help
I ll be looking forward your advice before proceeding.
Regards,
-Manuel