9

I was able to accomplish what I was after using the following... {if "{categories}{category_url_title}{/categories}"!=""} CATEGORY EXISTS {if:else} NO CATEGORY EXISTS {/if}


7

The problem with that is that if {parent_id} doesn't get replaced with a number before the conditional is evaluated, then EE will choke because when converted to PHP it becomes: if ({parent_id} == 0) Either this {if parent_id != 0} Or this {if "{parent_id}" != "0"} Is more fault tolerant when the variable doesn't exist. But, you may wonder, why is ...


6

I believe you need to have your categories tags set within the relationship tag pair like: {exp:channel:entries channel="parent"} <h1>{title}</h1> {relationship_field} <p>{relationship_field:categories backspace="2"}{category_name}, {/relationship_field:categories}</p> {/relationship_field} {/exp:channel:entries}


6

Not sure if it is best way to do this, but something like this: SELECT ct.title AS entry_title, cd.field_id_6 AS custom_field_6, (SELECT ca.cat_name FROM exp_category_posts cp INNER JOIN exp_categories ca ON cp.cat_id = ca.cat_id WHERE entry_id = cd.entry_id AND ca.group_id = 1 LIMIT 1) AS cat_1, (SELECT ca.cat_name FROM exp_category_posts cp INNER ...


5

I made Category Field for that very reason. http://devot-ee.com/add-ons/category-field


5

If you are using the exp:channel:categories in dynamic mode, no matter if using category_name on URL or category ID, you can use the {if active} conditional: {exp:channel:categories channel="News" style="nested"} <a href="{path='news/show/'}" {if active} class="active"{/if}>{category_name}</a> {/exp:channel:categories} If you are not on ...


5

UPDATE Since you would probably prefer to truly just move an existing category to a new group (and not create new ones and reassign entries as outlined below), this SQL is all you would need: UPDATE exp_categories SET group_id = X WHERE cat_id = Y OR parent_id = Y X = new category group Y = parent category that you want to move to new group The OR ...


5

Try this free extension from the mighty Low! http://gotolow.com/addons/low-seg2cat/docs Working with categories? Then you need Low Seg2Cat. This extension will give you information about categories present in the URI, in the form of early parsed global variables. No more PHP in your templates just to retrieve a category ID, no more awkward category ...


4

Have you tried category="" in your channel? {exp:channel:entries channel="{channels}" category="3|9" dynamic="yes" } http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#category You could also try low seg2cat http://gotolow.com/addons/low-seg2cat/docs ...where n is the segment number. {segment_category_ids} will return ...


4

Category variables are only available within the {categories} loop. {categories limit="1"}{category_url_title}{/categories}


4

By default, you cannot do this, however, there is a simple extension you can use called Categories to Text to save your categories into text fields automatically. If you set those text fields to be searchable, then essentially you are searching the categories. And you can choose to hide those text fields on the backend by modifying the the publish layout. ...


4

Yes. From the docs: Low Search v2.4+ can also add category information to the index, making entries searchable by keywords present in their categories. Just like the regular channel fields, you can add weight to the category name, description and any of the category custom fields. Note: if you’re using ExpressionEngine 2.7+, making changes to a category ...


4

I think you're on the right track. I'd create a Matrix column that is a dropdown or multiselect. Then output those variables as CSS classes or data attributes and handle the sorting on the client side using something like this: http://mixitup.io/#Documentation. <ul id="filters"> {your_matrix_field} <li data-filter="{matrix_select_col_name}>{...


4

It depends how dynamic you want the URL to be along with the usage and setup of the site really. If it's just a simple blog/news site then you can set things up on the root URL like that but if there are other sections then you may want to consider including /news/category/entry_url where news is a template group of whatever your content consists of. ...


4

It depends. EECMS needs a category URL indicator if you want to use category_name instead of the ugly numeric indicator. But you can use the really good Low Seg2cat and to put all the code on your index template. {if "{segment_1_category_id}" == ""} {!-- your homepage code --} {/if} {if "{segment_1_category_id}"} {!-- your code to list all ...


4

Yes, just have your index template in your default group catch it (strict 404's may interfere with this though). Use Low Seg2Cat to identify the category, you'll need to check for none found, no_results and utilise embeds to keep the template clean. Using something like Template Routes means duplication in all the categories to catch them.


4

You should be using the {exp:channel:categories} tag instead since you're only grabbing the category names. View the user guide. <ul id="news_categories"> <li><a class="filter" data-filter="mix-all">All</a></li> {exp:channel:categories channel="News" show_empty="no" style="linear"} <li><a class="filter" ...


4

I have have this happen and others have as well... Usually comes up as a 403 Forbidden error. Alex Roper posted this code for disabling in the .htaccess file. <IfModule mod_security.c> SecFilterEngine Off </IfModule>


4

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.


4

By default EE looks for the category indicator in the URL, eg www.site/recipes/category/meat, then output content based on that category url title (/meat). If you don't want to use the category indicator you'll need to use the LowSeg2Cat addon http://gotolow.com/addons/low-seg2cat - you can then use one entries tag and one template for any category, simply ...


4

I think GWcode Categories would be the easiest way to do this: http://gwcode.com/add-ons/gwcode-categories. It can also do a great number of other things with categories. There's also an add-on just for counting category entries: http://devot-ee.com/add-ons/category-count I actually use both on my site. I don't think there is a native way to do this ...


4

Yes, this is possible. You can do this by making simple template and embed. Create one template template_name.html in your template group and insert below code. {exp:channel:categories channel="channel_name" disable="category_fields"} ******************************************************* <br> Category Name : {category_name} <br&...


3

To expound on my comment to this answer, and I acknowledge this is a bit unorthodox, this solution will improve performance by only executing one channel entries tag. The query tag will fetch the entry IDs, and dynamically build an embed variable that we will use on a single channel entries tag for this page request. {exp:query sql="SELECT entry_id FROM ...


3

Simple Search won't natively search categories. Luckily there's an add-on called Preparse from Solspace which will help make it work. Low posted on his blog about using Preparse to add categories into a searchable text field. Though the post refers to using Preparse with Low Search, it would function the same with Simple Search as well.


3

Assuming you are using category URL titles in your URL, like http://domain.com/category/news, then you can simply add a conditional within the loop like this: {exp:channel:categories channel="News" style="nested"} <a href="{path='news/show/'}" {if segment_2 == category_url_title}class="active"{/if} >{category_name}</a> {/exp:...


3

php (PHP Parsing Stage: ouput) {exp:channel:entries channel="courses" category="2"} <?php $excludefrom = '|{categories}{category_id}|{/categories}'; ?> <?php if (substr_count($excludefrom, "|2|") == 0){?> {course_start-date format='%d %M %Y'} <?php } ?> {/exp:channel:entries} (you can do the same using Switchee the same way ...


3

MX Default Category - tell me if is it something what you need. MX Default Category ext. helps to select default categories for any channels. It is also add select all trigger on parent checkbox to select/deselect all child.


3

Turns out the problem wasn't a parse issue after all. Playa disables categories by default so by placing a blank disable="" parameter on the {cf_feed_videos} tag it overrides this and re-enables categories for the related entries.


3

Unfortunately, you can't do this using the default exp:channel:entries. You gonna have to use JOINs in the query module. Or Dandy Cat.


3

I would highly recommend using Low Search to provide the filtering you're talking about. http://gotolow.com/addons/low-search/docs/filters#categories By default it would show all entries, and allow you to use your categories as filters to refine your results. It can do some pretty remarkable stuff, highly recommended!


Only top voted, non community-wiki answers of a minimum length are eligible