0

I'm running EE 2.7.3 and Tag 4.2.5, and I have tagged entries (products in my case). My stack is how to get URL to “product details” page of tagged product?

For an example I will tag Product#1 from category#1 and subcategory#1, then I will tag Product#2 from category#1 and subcategory#2 and next Product#3 from category#2 and sunbcategory#3. As return URL I suspect to get something like:

 Product#1: http://www.domain.com/category#1/subcategory#1/product#1
 Product#2: http://www.domain.com/category#1/subcategory#2/product#2
 Product#3: http://www.domain.com/category#2/subcategory#3/product#3

I have currently one channel for products and appropriate template groups for each category/subcategory.

Any clue how to get URLs to work? Should I use in that case Low Seg2Cat or GWcode Categories to get proper URLs based on {url_title} of tagged product?

Thanks

0

I have got my problem resolved by using GWCode Categories add-on.

Final code:

{exp:tag:entries channel="products" tag="{segment_2}" status="open" dynamic="no"}
  <a href="{site_url}{exp:gwcode_categories entry_id="{entry_id}" last_only="yes" style="linear"}{complete_path}{/exp:gwcode_categories}/{url_title}">
     <h3>{title}</h3>
  </a>
{/exp:tag:entries}   

where {segment_2} is a tag name with which product was tagged.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.