I am trying to grab the category ID from the last segment to use in a redirect back to that category page but nothing is showing up.

My main page is http://domain.com/store/shop/C28, then you click to view a single entry.

the entry is http://domain.com/store/product_detail/158

where 158 is the entry_id to display a dynamic entry showing one product.

In my redirect (after adding the product to a cart) I want to go back to http://domain.com/store/shop/C28

I have tried to use this in my add to cart but nothing is parsing for the seg2cat


When I view source I just see http://hookingrugs.com/store/shop/C"

with no ID.

Even if I just place {last_segment_category_id} on the page outside of any other tags I still get nothing. Why does low seg2cat not pick up on the last entry ID.

  • Have you tried passing {last_segment_category_id} as an embedded variable?
    – CreateSean
    Commented Jan 23, 2014 at 17:39
  • how would I do that? Shouldn't it work just on the page not inside of any tags? Is my issue that I am using <a href="{entry_id_path='store/product_detail/'}"> Commented Jan 23, 2014 at 17:41
  • Is the category group which this category belongs to enabled? CP Home > Extensions > Low Seg2Cat > Extension Settings
    – Sobral
    Commented Jan 23, 2014 at 18:53
  • IT was set to ALL Commented Jan 23, 2014 at 19:07

1 Answer 1


Low Seg2Cat doesn't pick-up category information associated with channel entry IDs in the URL - it picks up category information associated with category URL titles in the URL.

So, it is working, but it doesn't do what you thought it might do.

  • that is what I was guessing entry_id vs url_title Commented Jan 23, 2014 at 17:56
  • So if I am on this page domain.com/store/shop/C28 Shouldn't I be able to use: {last_segment_category_name} {last_segment_category_description} Commented Jan 23, 2014 at 18:25
  • Yes, you should. Commented Jan 23, 2014 at 18:48
  • doesn't work with C28 but DOES work when using category_url_title as the segment.. Problem is low seg2cat does not offer {last_segment_category_url_title} Commented Jan 23, 2014 at 19:06
  • this was my only option return="domain.com/store/shop/category{categories}{category_url_title}{/categories}"} Commented Jan 23, 2014 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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