Hi,
I wonder if anyone can help with a little question?
In one of my earlier posts I mentioned that I was setting up a product catalogue weblog with the following fields:
- Product Name (text input)
- Product Description (textarea)
- Product Type (dropdown)
- Product Picture(s)
- Product PDF(s) (manuals, product specs, etc)
- User Voting
I’ve done this but am now thinking about my sites navigation. I have a keyword search for products and this works fine but I also want to use a browse option as well.
Basically I’m trying to achieve this…. If a user clicks ‘Browse’ in the nav menu they are taken to a page that has a list of product types. The user can then select a product type and they will then see related products of that type.
At the moment I have this:
<ul>
{exp:weblog:entries orderby="{title}" sort="asc" weblog="products" dynamic="off" disable="pagination|custom_fields|categories|member_data|trackbacks"}
<li><a href="{title_permalink=products/index}">{title}</a></li>
{/exp:weblog:entries}
</ul>
This just gives me a list of products. This was fine but now I want to break the list down by product type.
So, been searching on this forum and reading documentation etc. to find a solution. Best I could come up with is this (product_type is a weblog field that is a dropdown list):
<ul>
{exp:weblog:entries orderby="{title}" sort="asc" weblog="products" dynamic="off" disable="pagination|custom_fields|categories|member_data|trackbacks"}
{if product_type == "Stationary"}
<li><a href="{title_permalink=products/index}">{title}</a></li>
{/if}
{/exp:weblog:entries}
</ul>
However, this doesn’t work at all and I get no output at all. If I use the following:
<ul>
{exp:weblog:entries orderby="{title}" sort="asc" weblog="products" dynamic="off" disable="pagination|custom_fields|categories|member_data|trackbacks"}
{if product_type != "Stationary"}
<li><a href="{title_permalink=products/index}">{title}</a></li>
{/if}
{/exp:weblog:entries}
</ul>
It outputs all entries with no selection at all.
Any ideas? Where am I going wrong?
thanks,
Ste
