2

I'm new to using Seg2Cat and I'm wondering if one of you extremely helpful folks out there may be able to help/offer advice or guidance based on my needs. A buddy told me Seg2Cat is what I need to pull this off, however I'm uncertain as to even set it up and get going.

I have a listing channel for some 'staff' who are spread throughout the US and some other countries. Each staffer is in a category based on their state of residence.

I want to be able to have a select dropdown list of the states, then upon selection of a state, it takes you to a page or renders the results of staffers residing in the state.

Thanks all!

| improve this question | | | | |
2

You don't necessarily need Seg2cat to do that, category views are already built into EE.

Assuming you have a template group set up called /staff all you need to do is add the Channel entries tag, plus category links for navigation, into the /staff/index template.

Sample channel entries tag for your staff entries

{exp:channel:entries channel="your_staff_channel_short_name"}
{title}
{/exp:channel:entries}

Sample categories list for staff navigation...

{exp:channel:categories channel="your_staff_channel_short_name"}
<a href="{path='staff/index'}">{category_name}</a>
{/exp:channel:categories}

For basic drop down code example look at http://ellislab.com/expressionengine/user-guide/modules/channel/categories.html#category-dropdown-menu

| improve this answer | | | | |
  • Thank you for your input. I successfully used this in tandem with seg2cat to display the state name instead of the category variable. Now I can't figure out how to get the results to display...I get a blank white page - but I'm sure I'm missing something in regards to pointing it to the right page for results. I'm wondering if it's the fact the staff page is a listing channel. – Tre Nov 30 '13 at 21:02
  • usually if you're pulling the category listing using seg2cat so it's based on the URL e.g. category="{segment_2_category_id} your channel entries or categories loop should be dynamic="no" – lealea Dec 3 '13 at 3:00
0

I'm a little confused by your setup. If by staffers in categories you mean like Zoo Visitor entries with literal categories then it may not always make sense for your urls to have the category url_title (again, it's not clear to me what your setup is like).

You could instead utilize this other add-on Cat2 to grab the category id and list channel entries by that.

| improve this answer | | | | |
  • Hi. Staffers are just the people in the listing channel of we call 'pro staff', professional representatives of the clients product. I have a category group called State - in that group I have United States and under United States I list all the states. Those states are category a staffer is associated with. – Tre Dec 2 '13 at 15:10

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.