Low Seg2Cat
ExpressionEngine 1.x, ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4
Back to this add-on's main page
View Other Add-ons From Tom Jaeger
No Output
Support Request
LMA Communications
|
Posted: 13 March 2012 12:51 PM |
|
|
|
Hi Low,
I’ve successfully used this add-on in the past, but for some reason i cannot get it to output anything for me at this time. I’ve set all segments to yes but no matter what I do nothing is being output by seg2cat
I’ve tried {segment_category_ids} and the variable I need {segment_2_category_id} but nothing is output.
My current template code (sidebar) is:
{exp:channel:categories channel="blog" class="subCategs"} <p><a href="{path="class="active">> {category_name}</a></p>
cat-name: {category_name} <br /> seg2-name: {segment_2_category_name}<br /> {/exp:channel:categories}
The main template is an entry listing and when segment_2 is a category it is limiting to entries in that category. Just can’t figure out why this isn’t working for me.
Thanks for your time.
|
|
|
Low
|
Posted: 17 March 2012 07:19 AM |
# 1
|
|
Developer
|
Try to turn on Template Debugging and look at the Snippets keys and values—the seg2cat variables should be listed there.
If the vars are set but empty, then there is no match somehow. If the vars are not set, there might be an extension conflict. What other extensions are installed?
|
|
|
Rowan
|
Posted: 12 April 2012 06:34 AM |
# 2
|
|
|
I’m having an issue with this too.
(0.009152 / 1.79MB) Snippets (Keys): segment_category_ids|segment_1_category_id|segment_1_category_parent_id|segment_1_category_group_id|segment_1_category_name|segment_1_category_description|segment_1_category_image|segment_2_category_id|segment_2_category_parent_id|segment_2_category_group_id|segment_2_category_name|segment_2_category_description|segment_2_category_image|segment_3_category_id|segment_3_category_parent_id|segment_3_category_group_id|segment_3_category_name|segment_3_category_description|segment_3_category_image|segment_4_category_id|segment_4_category_parent_id|segment_4_category_group_id|segment_4_category_name|segment_4_category_description|segment_4_category_image|segment_5_category_id|segment_5_category_parent_id|segment_5_category_group_id|segment_5_category_name|segment_5_category_description|segment_5_category_image|segment_6_category_id|segment_6_category_parent_id|segment_6_category_group_id|segment_6_category_name|segment_6_category_description|segment_6_category_image|segment_7_category_id|segment_7_category_parent_id|segment_7_category_group_id|segment_7_category_name|segment_7_category_description|segment_7_category_image|segment_8_category_id|segment_8_category_parent_id|segment_8_category_group_id|segment_8_category_name|segment_8_category_description|segment_8_category_image|segment_9_category_id|segment_9_category_parent_id|segment_9_category_group_id|segment_9_category_name|segment_9_category_description|segment_9_category_image|last_segment_category_id|last_segment_category_parent_id|last_segment_category_group_id|last_segment_category_name|last_segment_category_description|last_segment_category_image|freelancer_version|freebie_original_uri|freebie_stripped_uri|freebie_last|freebie_1|freebie_2|freebie_3|freebie_4|freebie_5|freebie_6|freebie_7|freebie_8|freebie_9|freebie_10|freebie_debug_segments|freebie_debug_settings_to_ignore|freebie_debug_settings_ignore_beyond|freebie_debug_settings_break_category|freebie_debug_settings_remove_numbers|freebie_debug_settings_always_parse|freebie_debug_settings_always_parse_pagination|freebie_debug_uri_cleaned|structure_1|structure_2|structure_3|structure_4|structure_5|structure_6|structure_7|structure_8|structure_9|structure_10|structure:is:page|structure:is:listing|structure:is:listing:parent|structure:page:entry_id|structure:page:template_id|structure:page:title|structure:page:slug|structure:page:uri|structure:page:url|structure:parent:entry_id|structure:parent:title|structure:parent:slug|structure:parent:uri|structure:parent:url|structure:parent:child_ids|structure:top:entry_id|structure:top:title|structure:top:slug|structure:top:uri|structure:top:url|structure:child_listing:channel_id|structure:child_listing:short_name|structure:child_ids|structure:freebie:entry_id|rootPath|rootPath-ee|pageTitle|cdnlgPath|brandspaceroot|site_id|site_label|site_short_name|last_segment (0.009198 / 1.79MB) Snippets (Values): |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||FALSE|articles/category/C51|articles/category/C51|C51|articles|category|C51||||||||articles+category+C51|success|error|preview||no|no||yes|articles/category/C51|articles|category|C51|||||||||||||||||||||||||articles|/articles/|http://www.bellyfit.com/articles/|||||http://www.bellyfit.com/|http://www.bellyfit.ca/|Bellyfit :: Moving Women|http://lghttp.11345.nexcesscdn.net/005022/|/themes/brandspace-minimal-portfolio-business-template/|1|Bellyfit|default_site|C51
I’m using Structure and Freebie at the moment.. these may be interfering with this extension?
thanks,
Rowan
|
|
|
Low
|
Posted: 16 April 2012 12:12 PM |
# 3
|
|
Developer
|
Freebie changes the internal segment array, so that might well give you issues, as Seg2Cat needs it to retrieve the segments from the URL.
|
|
|
Jim Hull
|
Posted: 25 May 2012 08:30 PM |
# 4
|
|
|
OK, so I’m having the same trouble too.
Turned on Template Debugging and I have the same kind of output as above (with all the |‘s—||||||||||). I don’t have Structure or Freebie installed. How can I find out what conflict there is or is this not an extension conflict problem?
|
|
|
Low
|
Posted: 26 May 2012 08:50 AM |
# 5
|
|
Developer
|
Well, Seg2Cat will return empty strings for non-maching segments, so it could be correct behavior. Are you sure there are valid category url_titles in the URI?
|
|
|
Jim Hull
|
Posted: 26 May 2012 06:24 PM |
# 6
|
|
|
Yes the 2nd segment is definitely a category URL title, yet nothing is being registered.
|
|
|
Low
|
Posted: 27 May 2012 06:02 AM |
# 7
|
|
Developer
|
Here’s a way to debug this.
First of all, check if the correct category groups are selected in the extension settings. If the category in the URI belongs to a non-selected category group, then the empty string is correct output.
Or else, enable the output profiler and look up the SQL query performed by Seg2Cat, which should look something like “SELECT LOWER(cat_url_title) AS cat_url_title…”. Then run that query in the SQL manager. If there are results in the SQL manager, but not from the extension itself, then there’s a conflicting extension somewhere, probably. Check which extension use the sessions_end hook as well and try to disable them to see of that helps.
|
|
|