Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [categories]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
137 views

Organizing Entry, Section, and Category hierarchies

I have a site with three broad sections of content: Humanities, Business, and Music. Within each of these are sub-sections. Under "Humanities", for example, is Politics, History, Economics, etc. ...
1
vote
0answers
44 views

Find category through ajax using ElementCriteriaModel

I'm trying to run a controller action with ajax in a new plugin I'm making. The action needs to return all categories from a group, so nothing impossible here. When I run the actionUrl in the ...
1
vote
1answer
81 views

Finding corresponding category in different subtrees of a category group

I'm building a language switcher for a clients website. The website consists of multiple regions which can have multiple locales. As regions aren't supported yet in Craft 2, I've worked my way around ...
1
vote
1answer
91 views

How do I add the Categories and tags related to each entry?

This is my basic entry layout and I just want to display the linked category and tag names as indicated… <div class="posts sidemeta"> {% for entry in craft.entries.section('news').find() %} <...
1
vote
1answer
344 views

Only show items related to the lowest category level

I have a category group (CG). I have a channel of entries with a matrix field (MF). Every block in that matrix field has a category field linked to the CG. I want to list all the MF blocks in an ...
1
vote
1answer
181 views

Why do I get 'Could not resolve the subpath “{slug}” after trying to add a category select to a Neo field?

I tried to add a Category Select field into a Neoblock but when i first saved the entry I received the following error: Internal Server Error Could not resolve the subpath “{slug}”. I ...
2
votes
2answers
37 views

Need a little help with basic understanding of how categories work

I am trying to figure out how I can put categories to use, and I need some help. I have created a category group called "group1", and 2 catogories inside called "cat1" and "cat2". and I have added ...
2
votes
1answer
706 views

Entries related to BOTH categories

I've got categories setup like this (Parent & Children): Type Tops Dresses Pants Colour Black Red Yellow When I use this in a category filter and choose Dresses and ...
1
vote
2answers
156 views

linking to staff page, how to setup entry

I am fairly new to Craft and I am hoping someone can help point me in the right direction so I am not having to do double the work or have to learn the hard way that there is an easier way. I am ...
1
vote
1answer
206 views

Simple category-entry search filter

I'm trying to figure what would be the simplest way to do such filtering: I would like to make it in that way that selecting one of "Specialities" category would limit results from the selected "...
1
vote
1answer
288 views

How to get the unique categories from a list

I have a set of FAQ entries. Each entry has one or more categories attached. To be able to filter entries related to a category I need a list with unique categories. Using my solution I'm getting ...
1
vote
1answer
144 views

How to use category in auto generated title?

I have an entry which has a category field. I want an auto-generated title for this entry that uses the assigned category title (first category title in case of multiple categories). I am not sure ...
0
votes
1answer
57 views

Craft Ordering breaking nth child?

For some reason, when outputting 'featured' tagged items, It's ordering them I presume by alphabetical values which is breaking the nth-child CSS set on every 3rd element? Is there anyway to stop this?...
2
votes
2answers
276 views

Batch assigning a certain category to existing entries

I have a few 1000 existing entries and just introduced a new Category type. And I would need to assign all existing entries, to a certain category. I've been looking in the MySQL databases what ...
0
votes
0answers
170 views

Categories as Breadcrumbs

I have a site setup using a single article detail page for multiple channels. Each channel has a different category group and I need to output the categories as breadcrumbs so it would ideally look ...
1
vote
1answer
84 views

Combine two almost identical sidebar templates, used for blog index and category index pages

I'm struggling to combine two almost identical sidebar templates. I’m working on a site that has: a blog channel section with an index template that ‘includes’ a ‘sidebar-main.html’ template a ...
3
votes
1answer
203 views

Categories within matrix for relatedTo

I have a matrix field with a category field. I need to group these matrix items by category and give them headings which I'll use for tabs. This is how I'd do it for entries but is it possible for ...
1
vote
1answer
92 views

Fetch category name

How can I display category name on template used in user->group. {% for restaurant in craft.users.username(userId) %} {{ restaurant.name }} {{ restaurant.addressLine1 }} {{ restaurant....
2
votes
2answers
232 views

How to create a user editable dropdown field?

Trying to figure out the best way of handling this scenario: We have a data field for a entry type that should allow an editor in the CP to select one option from many (ie. a dropdown). However, we ...
1
vote
2answers
64 views

Show related entries grouped by category with category title and description

Anyone able to direct me on this? I have a page that allows you to pick related entries (cables) within the page I want to output the related entries (cables) but group them by their category. I have ...
1
vote
0answers
112 views

Query category by price

My client has requested to be able to filter the results page by price via a dropdown, which you can see in the attached screenshot. Basically the results page shows a list of around 15 property ...
6
votes
1answer
603 views

Custom Category order in a Categories Field

I have a load of projects, each of which can have zero or more categories which indicate the particular type(s) of work involved. As well as using these categories to produce a 'category page' of ...
1
vote
0answers
92 views

Simpler way to code up a category conditional?

I've coded up conditional for categories. I'm still new to Twig and curious if there is a simpler way of coding the following. {% for feedItems in craft.entries.section('news').limit(null).offset(1)....
2
votes
2answers
989 views

How can I filter selected/related entries by their categories?

I have a section called "Events" and an Entries field, we'll call myEntriesField to select related entries from another channel called "Exhibitors" On the Events page, I need to display the related ...
1
vote
1answer
189 views

Creating a smart restaurant menu

I'm building a website for a restaurant and I wanted to make the back-end as easy to use as possible. So I thought of a system like this. Allergens - Contains name and icon Ingredients - Contains ...
1
vote
1answer
147 views

Group entries by category than by month based on Date/Time field

I would like group entries first by what category they are in, than group by month based on a Date/Time field like this for example: Category 1 February 2017 Event 1 March 2017 Event 4 (in all ...
1
vote
1answer
169 views

How to use the same category group as a filter on multiple channel sections?

I have two channel sections, each with only their own entry types. I've added the same category group field to both. I'd like to filter each channel's list of entries by the same category group. So ...
2
votes
1answer
311 views

Structure a site with multiple locations with categories, structure or “multisite”?

I'm proposing to use Craft for a company that runs multiple golf courses. Along with some general pages for the company as a whole, each location (course) is to have it's own microsite, for want of a ...
1
vote
1answer
153 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)....
6
votes
1answer
213 views

Reorder selection of categories in category fieldtype

I'm looking to reorder my selected categories within a category field. I'm hoping this is possible because the order an editor selects these categories is important, primarily for the .first() ...
1
vote
1answer
132 views

Change markup depending on category of an entry

I am trying to output a news section, where I want to display the news categories as classes of the article. That works fine. But I also want to change the markup for a certain category out of the ...
1
vote
1answer
57 views

All categories selected by default for an entry

Is it possible to create an entry, and have all the categories added by default ? Let's say I have a category called 'materials', with values like 'gold', 'silver', 'copper'... They should all be ...
2
votes
1answer
255 views

Canonical url for product with multiple categories

I'm building a shop using Craft Commerce where a single product can be assigned to multiple categories. The url structure I'm using for the product detail page is: http://domain.com/category/product-...
1
vote
1answer
91 views

Bulk upload images, generating a seperate page for each image

Building a photography website for a client, need a way to bulk upload images, much like using the assets field. I want these to be grouped into different sets by entry or category. So that I can ...
1
vote
1answer
146 views

Display different Categories groups in custom breadcrumbs

I have a custom list of breadcrumbs that two of the levels reference different Category Groups. I'm able to get the correct breadcrumb to display for the page that I'm on using category.title, but I ...
2
votes
1answer
98 views

How to setup the structure in Craft for a Property Development site I'm building

I've been designing and building a property developers website for the last 9 months (client delayed building it due to economic reasons), but now we are at the point where it's ready to be built into ...
2
votes
1answer
37 views

Sorting categories into list put single one at end of it

I'm trying to put a single category (as long as it's populated) at the end of an category list. My code is working so far, is there an easy way to pick out the 'Others' category and append it to the ...
1
vote
1answer
56 views

Navigating through entries within a category when they belong to multiple

I need some advise on the best way to achieve this. I have entries within a section which could belong to category A, B, C, D. Any of these entries could also belong to a Featured category. Each ...
1
vote
1answer
470 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
178 views

Matrix with an entries field and need to grab category title

Any help would be greatly appreciated! I hope I explained my situation in enough detail to get the help that is needed. Currently I have two channels that need to share information. This is going ...
2
votes
1answer
205 views

Better way to group by category and include full category entry

The basic idea is that I want to group my entries by category, but I want more than just the category title—I need the entire category entry. My previous post alludes to this, but I've since ...
2
votes
1answer
2k views

filtering entries by category

I've got my news entries paginated and I have a featured entry on the first page so I'm wondering what the best approach would be to filter by category. Here is what my template looks like: {% ...
0
votes
1answer
87 views

Category conditionals

I have an entry page that lists out specific info for a product. I am using categories to sort the entries. I'm trying to figure out how to write a conditional that pulls in something specific if the ...
1
vote
1answer
263 views

How to get Category URL from field in Matrix

This is my Matrix set up: I'm stumped to how to get the Categories URL. {% for block in entry.galleriesItem %} {% switch block.type %} {% case "galleriesItem" %} <a href="...
1
vote
1answer
296 views

Category structure with multiple groups

I need only 2 main categories, A and B, and both can have unlimited subcategories. Ideal would be to split these into groups but how can an editor choose between groups AND only select or create a ...
1
vote
2answers
1k views

Displaying products from a category

New to Craft Commerce and doing something pretty template intensive. I am following this https://craftcommerce.com/support/product-taxonomy and https://craftcommerce.com/support/products-related-to-...
1
vote
1answer
101 views

How can I set up a filter URL like example.com/category/foo/type/bar/country/usa

Given a category based set of entries/products, and a filter system based on tags, how would I accept (one of) the following urls and let one template process them all (not interested in the ...
1
vote
1answer
74 views

Limitation of adding a Category from the CP field modal within an entry

Is there a way to either add a parent selector to the category field modal, or remove/hide the "+ New Category" button when editing an entry? We are using a category group to contain Locations, which ...
1
vote
1answer
96 views

Magazine possible in Craft?

I have been a wordpress user for the longest time, a friend of mine now uses Craft, I took a look at his backend and really liked the way he creates his content in it. I also like that it uses Twig. ...
1
vote
1answer
104 views

Can someone help me with my site structure? Sections/Category setup

Thank you for your time and patience I'm a newbie to the Craft world. I've been all over the Craft Documentation and this site trying to figure out the best approach for a site I am putting together. ...