We are developing a store for an antique shop, each product is a weblog entry in a weblog named products.
The weblog has a category group called item_categories, which contains the categories for each product.. So if they are uploading a chair, it goes into the category of “seating”, etc…
So if the user of the site were here: http://mayfairantiquedealers.com/collection
and clicked on “tables and desks” one would see all of the items under tables, and desks.
Here I am linking to the individual items in a template called “item_view”. And this is where I am having a problem. If I use this as the link to the items:
<a href=”{path=collection/item_view/{entry_id}}”></a>
The link works and I go to the correct item based on its entry id… But I loose the category.
This is what I am trying: And I really don’t see why it isn’t working…
<a href=”{path=collection/item_view/{categories}/category/{category_url_title}/{/categories}/{entry_id}}”></a>
The category is being displayed, but the entry_id is ignored, it just links to the first item in that category.
I believe I have all of my weblog preferences set correctly. This is the bit of code in the template: item_view:
<div id="inventoryView">
{exp:weblog:entries weblog="products" limit="1" dynamic="on"}
<h2>{title}</h2>
<div id="inventoryItem"><!-- shows one item -->
<div class="fullitem">
{exp:imgsizer:size src="{item_image}" height="600" alt="{title}"}
{if dimensions}
<p id="dimensions">{dimensions}</p>
{/if}
<a href="{path=locations}">{store_location}</>
{/exp:weblog:entries}
</div><!-- end this item -->
<div id="paginationControls">
</div><!-- end paginationControls -->
</div><!-- end inventoryBrowser -->
</div><!-- end inventoryView -->
Is there a way to get the category url title to be displayed in the URL along with the entry id? Reason for this, is that I am using jQuery to change the class of the category navigation and add a “current class” which makes the <li> background white when location.href matches a js variable called current_page…
