ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How can I create the individual product view from a category?

June 16, 2011 9:06am

Subscribe [4]
  • #1 / Jun 16, 2011 9:06am

    Ian Young

    200 posts

    I’m trying to achieve the following structure:

    Food > Lunch > [category] > [product]

    Where:

    Food is a template group
    Lunch is a template displaying a category list
    [category] is the category clicked on by the user which displays a list off all products in that category
    [product] is the individual product view page.

    I’ve got it working up to the point of view of the [category] page showing products within the clicked on category but I’m just not sure how to append the product title to the end of the URL and have it view in a different template for the individual product view. I’m aiming for the following URL schema for example when viewing the individual product page:

    /food/lunch/category/sandwiches/club-sandwich/

    From the category page what tag do I use in the anchor links to display the individual product page?

  • #2 / Jun 17, 2011 12:23am

    John Henry Donovan

    12339 posts

    Slippy,

    What you are running into is the default way EE URLs work

    An entry URL typically looks like this

    /index.php/template-group/template/entry-url-title

    While a category URL has the following structure

    /index.php/template-group/template/category-trigger-word/category-url-title

    There was an older article on this which may be of use if you want to convert the method to EE2.x

  • #3 / Jun 18, 2011 11:02am

    Ian Young

    200 posts

    John,

    I was aware of how EE URLs work but was just looking for the solution. I came across the same article and it was a big help. I got the desired URL structure working in EE2 with a somewhat modified version of the article.

    The think I like about EE is that there’s _always_ a way. 😉

  • #4 / Jun 19, 2011 12:09pm

    Greg Salt

    3988 posts

    Hi Slippy,

    That’s very true! 😊

    Are you good to go now?

    Cheers

    Greg

  • #5 / Jun 19, 2011 3:57pm

    Ian Young

    200 posts

    Hi Greg,

    I’m good to go and all seems to be working as far as I can tell. I’d write a howto but it would be pretty long and better suited to a blog post and most of it is covered by FortySeven Media’s excellent post on the subject.

    Thanks for the check back.

  • #6 / Jun 20, 2011 8:59am

    Sue Crocker

    26054 posts

    Glad you found a resolution. If anything else comes up, please do let us know in a new thread..

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases