Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [categories]

Categories are taxonomies for your entries, users, and assets.

Filter by
Sorted by
Tagged with
1
vote
1answer
120 views

Looping through returns nothing after using dynamic routes to get the entry type and category

I'll explain a bit of the structure of the content and then proceed to the issue. So i have a website with a shop in it with the url mysite.com/shop/, it is an channel section, and its template is ...
1
vote
2answers
139 views

User defined order for categories

I'd like to set a user defined order for a Categories field. For example, categories are: Cat A Cat B Cat C I'd like to give the ability for users to drag and drop the order, to say: Cat B Cat A ...
1
vote
1answer
2k views

Display entries related to a category (only bottom level)

I have a 2 level category system. Some have children, some do not. How can I display entries related to the last level only? If a category has no children, it should show the entries related to the ...
1
vote
1answer
103 views

Get categories ordered by the associated entries' postDate

I'm looking to show recent categories ordered by their associated entries' postDate. Is this possible? I don't want to list the entries within the category I simply want to list 4 categories that ...
1
vote
1answer
477 views

Search entries by matrix field

I have a matrix inside of which I have 2 fields, 1. dropdown list containing download types and another asset field. I would like to search first by a category and then I would like to further filter ...
0
votes
1answer
779 views

Listing Sub Categories of a Category related to an entry

I've been scratching my head over this for awhile and I can't seem to solve it. What I'm after is the following. I have various categories with numerous sub categories. I'd like to be able to ...
4
votes
2answers
567 views

Structure(s) vs. Categories for product catalog

So I am working on a project that includes an online product catalog. Is there a recommended way of setting up a catalog regarding the use of structure(s) vs. categories or a combination both? I ...
3
votes
1answer
1k views

How do I combine search for categories and entries into one set of search results?

I have a search page. I can search either categories or entries using {% set entries = craft.entries.search(query).order('score') %} {% set categories = craft.categories.search(query).order('score') %...
2
votes
1answer
952 views

How to populate Category field form frontend form?

I have a frontend form that has a select list for language. This field will allow for one language to be selected. In the backend I have a field set up for my entries as a category field populated by ...
1
vote
1answer
498 views

Nested categories in URL slug

I'm new to Craft and exploring whether it's worth my team moving our existing, deeply-structured content site onto Craft CMS. We have a heavily nested sitemap at the moment with 6 top-level ...
1
vote
1answer
646 views

Sort entries in a category via entry field

I have a section for Businesses. I also have categories that these businesses can belong to. On each category page I want to list all the businesses that belong to that category. So far so good, but ...
1
vote
1answer
84 views

Garnish event when changing category group

When I am on the categories index (admin/categories), is there a Garnish event that fires when you select a different category group in the sidebar? I want to add some custom JS after the AJAX request ...
1
vote
1answer
414 views

Child categories appear as their parent when selected

In an entry, when selecting a child category, the parent is shown as the selected item. This prevents the use of any child categories. Any help would be appreciated. Use Case: Selection Modal: ...
1
vote
3answers
309 views

Perform inclusive relatedTo query with multiple categories in Craft 2.5+ [closed]

I'm trying to to display entries related to "all" the given categories instead of "any" using the updated relatedTo method provided in Craft 2.5. In a related question, @BrandonKelly explains how to ...
1
vote
1answer
203 views

Get the category into the url of the product page

I'm in the middle of learning Craft Commerce. When I go to an individual product my URL says /shop/wella-shampoo/. I'd like it to say /shop/**hair-care**/wella-shampoo/ because this is the category ...
1
vote
1answer
160 views

How do I publish entries with a specific category id?

How do I publish a list of three most recent entries within a 'blog' section that feature the category id '42'? I presently have this code: {% for entry in craft.entries.section('blog').limit(3)....
1
vote
1answer
80 views

Excluding Array of Entry Ids Not Busting Cache

-- UPDATED -- My understanding of how the cache busting works is to make sure the query is within the {% cache %} tag. When looking into how it works I may not really be understanding the ins and ...