Questions tagged [categories]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
558 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 ...
1
vote
2answers
239 views

Find the nth top-level category in a nav tag

I want to output some code after the 10th top level category in a category listing. For example... 1. 1.1. 1.2. 2. 2.1. 3. ... 10. Zoiks! The problem is, I can't use Twig's loop.index in a ...
1
vote
1answer
123 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
279 views

Filter entries with AJAX

How would I sort blog entries displayed using AJAX? What I want to achieve is initially show all posts from a channel (All) but then let my users sort through these posts with a sub navigation using ...
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
133 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
2answers
216 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 ...
0
votes
1answer
898 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
610 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 ...
2
votes
1answer
1k 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
231 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
420 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
1answer
108 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
858 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
595 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
3answers
323 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
217 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
114 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 ...
0
votes
0answers
27 views

Filtering entries by category and author channel

I'm setting up a blog on a new site - a few hundred entries have been successfully imported. Now I need to set up front end filtering. Each summary on the listing page has a link to the category ...

1
2