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

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

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

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

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

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

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

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!


3

Use the backspace parameter: href="{url}/{channel_short_name}/{categories backspace='1'}{category_url_title}/{/categories}/{url_title}" Backspace removes x characters from the final output. Watch out if your entry belongs to 1 or more sub categories as your category URLs will grow uncontrollably.


3

No, unforchently you can't use '&' and '|' together. In category parameter you can use or '&' logic or '|' logic. possible solution: {exp:query sql="SELECT group_concat(entry_id separator ', ') as result_ids FROM exp_category_posts WHERE entry_id IN (SELECT entry_id FROM exp_category_posts WHERE cat_id = 1 AND cat_id = 2 AND cat_id = 3) AND (...


3

Edit your field and ensure that Default Text Formatting is set to None, this should fix the issue.


3

Its not clear from your question whether you're wanting to show the child categories based on the parent category page you're currently viewing. We needed to do the same thing, so I wrote a quick plugin, as I don't think there's any combination of EE tags that will allow you to achieve this. The scenario we used this in was if I was on domain.com/page/...


3

Alec's method works, but it might cause very high query counts due to the way EE generates nested Channel Entries tags. Take a look at the alternative method outlined in this post from EE Add-on superhero (and parse order master) Low. It achieves the same thing, but is much more performance friendly: http://gotolow.com/blog/nesting-tags-and-performance-in-...


3

Yep, that would be a job for the Categories filter. For each group of categories, use a category:group_name parameter name to combine AND and OR matching. For example: {exp:channel:categories category_group="1" style="linear"} <label> <input type="checkbox" name="category:group1[]" value="{category_id}" {if category_id IN ({...


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