20

DevDemon's Editor add-on does this. Editor on devot:ee.


10

In the past I've done a bit of a hybrid of the first two options mentioned. Create a channel for the categories, then create an entry in that channel for each category. Rather than using Playa or a relationship field, as long as the URL title of the category and the URL title of of the entry are the same, it's very easy to access both using the segment ...


9

If you're going the category route, you could use the native Dynamic Parameters, possibly with Dynamo, to filter entries. However, using Low Search (or Super Search), you can also filter by Relationship fields (including Playa fields), so that would be more flexible. For example, you can use inclusive filters, allowing to mimic category="1&2&3" as ...


9

I had the same problem and found that the Stash solution was the best approach for this. {exp:channel:entries channel="resources" dynamic="no" disable="pagination|member_data|category_fields"} {exp:stash:append name="resources_{categories limit='1'}{category_id}{/categories}" parse="inward"} <div> <div><img alt="{title}" src="{...


9

In EE, all pages require unique URL Titles. However, in Structure, if the pages have different parents, they can share the same Structure PAGE URI. In your case, so long as you are using the full Structure URIs to display the pages, you shouldn't have any issue reusing "sub1" and "sub2" in each category tree. So while EE will create unique URL titles ...


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}


8

The {exp:channel:categories} tag is specifically for displaying a list of all categories. You can use the {categories} variable pair inside of the {exp:channel:entries} loop to get the assigned categories to that entry. You can read more at the docs {exp:channel:entries channel="imagegallery"} <div class="element {categories backspace="1"}{...


8

This parameter is confusing, and has been the subject of much consternation. As per Travis' comment on the docs page: If an entry is in two categories, cat_id 1 and cat_id 2, and you ask for just entries with category="not 1", the entry will still show up in the output. This is because it is in category 2. This may not be the behavior you expect. Also ...


7

Generally in ExpressionEngine you don't keep the category information in the URL for your single entry page. This is because an entry can belong to more than one category, so you will end up with more than one URL for the same product, which is bad for SEO. If you really want to do this, you might find Low's Seg2Cat helpful.


7

Get Low Seg2Cat, make sure the Set All Segments setting is set to Yes, and then use something like this: {if segment_2 == 'category' AND segment_3_category_id == ''} {redirect="404"} {/if} ...or the Switchee equivalent.


7

The 'proper' way to do this is to link as normal to single pages that show the entry detail but then use JS to hijack the link's target and pull in just the content via ajax. I use the MX Ajax Detect add-on to make a single template respond differently (ie, returning a full page vs returning just chunks of content) depending on whether it was requested via ...


7

Admin_content extends the CI_Controller class, which is not designed to be instantiated like models and libraries within the MVC paradigm. You can however reuse the libraries within that controller. Unfortunately, the best method here may be to copy and paste your code into your own add-on do what you need. Obviously only copying the bare minimum amount of ...


7

The {exp:channel:categories} sadly does not have a limit parameter. GW Code Categories does have a limit parameter though (along with many other useful features when working with categories).


7

By default the Seg2Cat extension will only populate the {segment_n_category_id} vars if the corresponding segment is present. So in your case when segment 3 is blank the {segment_3_category_id} var does not exist so it's passed to the channel entries tag as a raw string. To fix this you can tweak the extension settings and set "Set all segments" as Yes. ...


7

I have used this, which isn't the most elegant solution, but does work: {if "{categories show_group='xy'}y{/categories}" != ""} Category: {categories show_group='xy'} ... {/categories} {if:else} No categories here {/if} You could also try the BW Category Count add-on.


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

Well, you could get the list and info of categories you have assigned the entry to by Categories tag inside the Channels entry tag. Is this something on the way to the final goal?


6

but it seems it's not possible to add multiple 'categories'-fields. I'm not sure I'm reading that right though, you can add multiple category groups. If you go to Admin > Channel Administration > Channels > Edit Group Assignments Where "Edit Group Assignments" being the link to where you can assign category groups, statuses and a channel field group to a ...


6

There's a commercial addon called Primary Category by Solspace which is what you are probably looking for.


6

I can think of a couple solutions for you. Low Seg2Cat Since you're only using the category name in the title in the <head>, you could very easily use Low's excellent Seg2Cat extension. I use it on nearly every site, and it's great for grabbing all of your basic category metadata based on categories found in URL segments. Assuming your url structure ...


6

I would go with gwcode-categories: it allows you to target categories by depth. F.ex: {exp:gwcode_categories channel="example" depth="3"} {cat_name} {/exp:gwcode_categories} You can find more info in the docs. Anyway, your code should be something along these lines: {exp:gwcode_categories channel="example"} {cat_name} {if depth == 3} ...


6

I'm afraid your answer is no. EE does not make it's custom field types available outside of the Channels functionality and it would be a nice feature to have in other parts of the system such as for Members or some addons like ones that add form functionality. This is why you see several addons such as Profile:Edit and Zoo Visitor actually create a ...


6

Editor allows a WYSIWYG for the category description field only. Not sure if that will be enough for your needs, but it might be worth looking into. You can see a picture of what that will look like:


6

Within your channel:entries loop, use the categories loop: data-type="{categories backspace="1"}{category_url_title} {/categories}"


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

For the title in the head I'd use Low Title: <title>{exp:low_title:category url_title="{segment_n}"} - News - {site_name}</title> Assuming you're looking to just list the category and its description for the article below, for the body you can just use Channel Entries and Low Seg2Cat: {exp:channel:entries channel="news" category="{...


5

Good morning! Let's step back for a moment. First, if you are new to EE and especially categories then I'd recommend reading through this tutorial I wrote a while back. Basically I think you are trying too hard, and shouldn't need to nest entries tags into category tags like that - it not only shouldn't be necessary but can be a performance drain as well. ...


5

Low Seg2Cat works great for this. Low Seg2Cat loops through the segments of the current URI, matches them against existing categories, and registers the matching categories as global variables, which you can use in your templates. You'd be able to access your category name using {segment_3_category_name}


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