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

The GWcode Alternate addon will accomplish what you need. This simple plugin for ExpressionEngine 1 and 2 lets you rotate through any number of values to create alternations, for CSS classes for example. You can use this plugin to rotate through any number of values, similar to the switch variable in the {exp:channel:entries} tag for example. ...


5

A JOIN requires an ON clause too. Also, it's exp_channel_titles, not exp_channel_entries. Try this on for size as the sql parameter: SELECT COUNT(cp.entry_id) AS post_count FROM exp_category_posts cp JOIN exp_channel_titles t ON cp.entry_id = t.entry_id WHERE t.status IN ('Open', 'open') AND cp.cat_id = '{category_id}' If you want to add more statuses to ...


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

SuperAdmins have access to everything, hence no issues. First step is to make sure the Admin group has permissions to add/edit categories enabled. The setting is called "Can edit and add new categories" and it's located here: Members ‣ Member Groups ‣ Create/Edit. I you want them to be able to delete categories, enable "Can delete categories" as well. ...


4

Yup, the solution here is to use the GWcode Categories plugin rather than the standard EE Channel Categories tag, and Low Seg2Cat instead of relying on EE's dynamic category methods. So, to output your categories list (as a simple example): {exp:gwcode_categories channel="my_channel"} <a href="/filter/{complete_path}">{cat_name}</a> {exp:...


4

What you want is the backspace parameter. "Backspacing removes characters (including spaces and line breaks) from the last iteration of the loop." {categories backspace="2"}{category_name}, {/categories}


4

NotoriousWebmaster - Playa disables categories by default. You'll need to add disable= to over-ride the parameter. {exp:playa:children field="also_like" status="open|wide" disable="members"} or similar. Let me know if that helps!


4

I've discovered the cause: The channel entries and categories are added through a web service, and it turns out I missed the exp_category_field_data table. Without anything in this table, only the last category was showing. I've updated the web service to add the categories to this table, and it's working correctly now.


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&...


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