Questions tagged [categories]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
51 views

How do I filter / restrict entries field in CP with a category

Is there a way to restrict the entry field type to specific categories? For example when adding a new field with type "Entries" to select the categories from where entries will be available. I found ...
0
votes
1answer
2k views

Issue with twig loop.first loop.last contained in nested for statement

I'm trying to pull out selected categories in a front-end user profile. The cats have 2 levels and need to be pulled out into a nested list with only the selected options. I've tried different ways of ...
2
votes
1answer
608 views

Working with multiple categories

Does anyone know if you can work with releatedTo between categories? I’d like to get all the categories in a categories.groups that are related to a single category I have some entries in a channel, ...
1
vote
0answers
79 views

Exclude output of entries/users/products if category relation has particular field value

So basically what i have is a big set of categories (about 86 total, multi-level). Within my category fields i have a lightswitch with the handle 'private'. I would like to know how i would write a ...
3
votes
1answer
437 views

Output entries sorted by category title and paginate

I'm stuck on an issue where I have to paginate a list of entries that would be sorted by category title. So basically, I need to: fetch entries in the 'project' section sort those entries by the '...
1
vote
1answer
412 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: ...
3
votes
1answer
723 views

Limit category choice in entry to 1 and select child category

I have a section of book entries with a categories field called "Genre". A book can fall into multiple genres. A stripped down version of the categories works something like this: Fiction Crime, ...
0
votes
1answer
174 views

Navigation structure and uri problems

I am using structure type entries for navigation with three fields for navigation that uses either: -customlink field (plain text) or -category entry as the source for links. I have product ...
3
votes
1answer
88 views

How to merge/combine/transfer-entries-between two categories in the CP?

I’ve got 2 categories each with lots of entries. The client wants to delete one category, and transfer it’s entries into the other one. If I delete the category, it just disappears, but I somehow ...
0
votes
1answer
87 views

How do I prevent a runPendingTask script being included in returned HTML via ajax? [closed]

I have created a route to retrieve some categories via AJAX. When the AJAX call returns the HTML a runPendingTask script is also returned with the HTML. How do I prevent this? /*<![CDATA[*/ (...
1
vote
1answer
511 views

Loop through entries with custom ordering, showing one from each category then start loop again

I have a channel with entries that may or may not have a custom date field populated. I'd like the display a list of entries, looping through each category, showing one entry from each category. Then ...
1
vote
1answer
39 views

Migrating Joomla K2 nested categories

I have a large-ish site built with Joomla and K2, with articles stored in a hierarchy of categories.. What is the proposed way to recreate the Category hierarchy functionality? What I am interested ...
1
vote
1answer
512 views

How can I get all child categories - of a child category based on url segment?

I am missing something very obvious I think. I am trying to get all child categories based on url segment. For example: "mysite.com/foo" I have a category Group called Sections Within Sections I ...
2
votes
1answer
893 views

How to filter entries in multiple category groups by selecting multiple categories

This question is very similar to the question posted here I have asked in the comments but my requirements are slightly different. I am trying to filter search results by categories in more than one ...
0
votes
1answer
141 views

Storage advise for product catalog

I am going to build a boat catalog. Boat products x 40 Types of product x 3 Suppliers of products I was wondering what the best storage setup? For boat and suppliers these could be entries and ...
1
vote
1answer
235 views

Categories on a Front-end form

I have searched the forum and cannot find the answer to my question. I know how to populate a dropdown with the categories that are already in the system, but what happens if the category that needs ...
0
votes
0answers
82 views

Advanced search form with checkboxes [duplicate]

So it seems that Matrix fields don't work with the object syntax so I've changed my field structure to use standard dropdowns, checkboxes and a number field. I have the dropdown (gender) and number ...
0
votes
1answer
103 views

Category archive page isn't filtering by current category

Ok all - this is bound to be ridiculously simple, as it's one of the most basic things you can do (https://craftcms.com/support/entries-related-to-category) - but I am ill and I can not figure out ...
1
vote
2answers
119 views

How can I hide entries depending on which category they are associated with?

Right now, I have a staff profile page. Each person on the page has a category association (professional, leadership, student). When the students graduate, I want to add an 'alumni' category to their ...
1
vote
1answer
279 views

How to fetch Category of current Entry and build “Next / Prev” urls

My original question here helped me figure out how to build my URL structure but now the site has introduced two categories: design and photo. I want the "Prev" and "Next" buttons to navigate back ...
3
votes
1answer
663 views

How to display all entries within a given category

I've got a category group called allcategories, inside of this is two categories called design and photo. I'm trying to filter all entries in the section projects by the category `photo' but none of ...
0
votes
1answer
268 views

User groups in relation to categories

I am building a community website that currently have two user groups but it might increase so I am trying to automate everything. The current groups are: 'teachers' & 'candidates'. I have a ...
1
vote
1answer
196 views

How to only list translated categories?

I have a site for a company that is established in US markets and expanding into markets overseas. The site has products and those products are grouped into categories. Due to the costs of ...
0
votes
1answer
206 views

Order merged query by shared field

I’m trying to merge two query sources (some entries and some categories) but have them ordered by a shared field that is a date field. Here’s what I have so far: set classesLocations = craft.entries....
2
votes
1answer
659 views

Breadcrumbs for category pages

I'm a Craft first-timer building a simple blog site. I want to include breadcrumbs at the top of each page like so: siteurl.com: [Blog] siteurl.com/category/example-category: [Blog > Example ...
0
votes
1answer
438 views

How can I get the parent category group via the category to create multiple relation criteria?

I have two category groups: Cars and Colors My Cars category looks like this: Cars Sports Cars Corvette Lamborghini Porche My Colors category looks like this: Colors ...
0
votes
1answer
78 views

Entries from hardcoded category

Should be easy i thought. How can i display all entries from a section from a certain category? This is my code now, but nothing shows up (screenshot bottomleft): {% set category = craft.categories....
1
vote
1answer
643 views

How to list an entries selected nested categories?

I have a entry field populated by categories. The number of categories an entry can have is unlimited and the categories are set up as nested categories i.e. first level ---second level ------third ...
1
vote
0answers
128 views

How to pull out entries related to multiple nested categories?

I have a category set up with nested categories so: Level1 -level2 -level3 In my entries channel each entry can have multiple nested categories so we may have an entry with: cat1 -...
2
votes
1answer
315 views

Output Matrix in relation to category

I'm setting up an FAQ page using a matrix. Each Matrix block contains a question and an answer field. Each Q+A needs to be outputted within a section on the same page such as General, Payments... I'...
6
votes
1answer
925 views

How can I get to a category via the category slug using the ElementAPI

I am using the ElementAPI to generate a json response of data based on the value (locations) that was chosen from a drop-down. I think I have all of the pieces I need, i'm struggling with how to put ...
2
votes
1answer
207 views

Dealing with listing multiple categories

I'm looking to use multiple category group as a navigation. The categories have 3 levels and will be listed depending on set variable. I can list all categories in the group with the following: {% ...
1
vote
3answers
308 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 ...
2
votes
1answer
952 views

Display Category Group Name in Template

Having a bear of a time doing something which seems like it should be quite simple. I'm trying to display the category group name in my templates, using the handle and can't quite get it. I've ...
2
votes
1answer
88 views

getSegment matching category title

I'm trying to match the 2nd part of the slug with the category title to then place a 'current' class on the link. Something like: {% nav category in craft.categories.group('blogCategories') %} &...
1
vote
2answers
120 views

Use only the sub categories from a category input

I have a category input. The category group has two levels. When accessing the category input via Twig I am trying to only grab sub categories the user selected. However when I use {% set ...
3
votes
1answer
546 views

Fields associated with a category group

I have set up a custom field for a category group. How do I get the value of this field in a loop that goes through entries? Each category in the group could have this field's value set as true or ...
2
votes
2answers
1k views

How do I only display list of categories at certain level of parent category that have entries

I try to explain you semantically what I want to achieve here. I couldn't make it shorter. Sorry. Navigation will be constructed from .level(1) categories. At "site.com/firstLevelCat" I want to ...
1
vote
0answers
119 views

Display sub-category depended on selected category with related entries

I am not even sure, I can explain it. I have a several sections, but I'll go with "Products" section. Than I have category group called "Filter". I'd like to use only this category group for all ...
1
vote
1answer
975 views

Entries grouped by Category and then Sub Category

Been trying to get this working for a few hours but no joy, hope someone can help. I'm looking like an post archive of all entries. Something like Category1 Sub Category 1 Entry / Entry Sub ...
3
votes
1answer
348 views

How can I use categories to filter entries?

It's a pretty basic question, but for some reason all of the possible solutions do not work for me. I tried this: https://craftcms.com/docs/relations#the-relatedTo-param And also this (which I ...
3
votes
1answer
280 views

Dynamic Category template paths

I've got a site with several locales and want to reuse a set of categories across locales but want to target a locale specific template from within each. Is it possible to set a locale-specific path ...
4
votes
1answer
1k views

How to display the title of a category based on its ID?

I’m passing the ID of a category to a template via a catId query string (i.e. http://example.com/some/path?catId=10). How do I display the title of that category?
3
votes
2answers
495 views

Loading related entries by category using a select menu

I have a list of people (entries) who are related to Categories. I would like to create select menu which will change (filter) the people (entries) shown on the page depending on which category (...
3
votes
1answer
410 views

Category slug is getting numbers appended to it

I have a category Australia and have been experimenting with boboldehampsink import plugin. After deleting categories and starting over the category Australia now has a slug called 'australia-6'. I ...
3
votes
1answer
50 views

How to plan IA for a directory of content thats good for admins and users

I want to build a directory of fishing ports It will have approx 500 entries, each geocoded for map display. I will have 4 views; 1) Directory with map of entries 2) Country and entries 3) Cities (...
1
vote
2answers
323 views

Issue accessing single entry from within category template

I've got a product section on a website where individual product entries are categorised. On the section landing page all the products are listed organised by category. On the individual category ...
2
votes
1answer
124 views

Best practice way to store countries and cities

Is there a recommended way for storing countries and cities in craft? I can see fields and categories as obvious options but its difficult to see the disadvantages/advantages of either at the ...
3
votes
1answer
715 views

Search for related entries via AJAX given multiple parameters

I am attempting to create a relationship between products. I have a section named "product" which is a Structure. Each "product" entry has a category field called "species" and a category field called ...
2
votes
3answers
350 views

Multiple sources on category field type - possible?

We're trying to setup a category field type to allow the selection of 1 category but from multiple category sources. Is there a simple way to achieve this without writing a custom plugin / fieldtype? ...