Questions tagged [entry-type]
The entry-type tag has no usage guidance.
99
questions
1
vote
0
answers
30
views
cannot create matrix in craftcms 4.2.3
I just created a fresh project with craftcms 4, but am running into issues creating a matrix. Even with just one block field. It gives me the error
Cannot assign string to property craft\models\...
1
vote
1
answer
146
views
How to get a list of entry types for a section using GraphQL?
The goal is to get a list of entry types for a section, so that a user can filter entires by entry type e.g.
query Entries {
entries(section: "content", type: ["news", "...
1
vote
1
answer
20
views
Pedigree In channel type entry
I want to create a pedigree for user. I have created a section (channel type) and added some properties like about, name and some other user properties. I also want to add a pedigree for that user but ...
0
votes
0
answers
45
views
Better Performance: Entries Versus Matrix Blocks
I've been struggling with the best way to architect a new content type for some time now and wondered if anyone had any advice.
Here's the desired end goal: to be able to record granular pieces of ...
2
votes
1
answer
489
views
Get entry associated with current uri
If I am visiting /recipes/spaghetti which corresponds to an entry in a recipes entry type and the recipes/entry template, is there a way to directly get the current entry's data from within the ...
1
vote
4
answers
90
views
Querying all content entries for a page
I'm new to Craft CMS and I'm trying to build a new website using Craft. I want my client to be able to change the order of displaying contents of a page by dragging and rearranging them in the Admin ...
1
vote
2
answers
61
views
Specify a specific entry type in paramaters
I am currently searching within multiple sections on my site.
I'd like to limit one of the sections (courses) to a specific entry type (cce)?
Any help would be greatly appreciated!
{% set params = {
...
0
votes
0
answers
112
views
Create a New Entry with Fields Populated from an Existing Entry Table
I am still learning how to work with craft on the back end but so far I can see it is a very powerful platform!
I was wondering if there is a way that within an existing entry channel say "foo&...
2
votes
2
answers
66
views
Max # of entry types?
Is there a limit to the number of different entry types a section can have? For this project I might need 50+.
I think I need more content to meet the quality standards so I'll explain: my client ...
1
vote
0
answers
642
views
Check if entry type has field
I can't seem to figure out a good way to see if an Entry has an actual field defined. All the examples I see just to a falsy check for the property name, but this might fail if you have previously ...
0
votes
0
answers
123
views
Unable to delete Entry: Numeric value out of range
I have a Structure section that I converted to a Channel. I then tried to delete an Entry Type from the Control Panel and get the following error:
{"error":"SQLSTATE[22003]: Numeric value out of ...
2
votes
1
answer
357
views
exclude array of entry types in query
Here is my query:
{% set resources = craft.entries({
section: 'resources',
type: 'not caseStudyLanding'
relatedTo: filterParams,
orderBy: 'postDate desc'
}) %}
I would like to ...
1
vote
1
answer
235
views
Cannot switch entry type
I've got a newly upgraded Craft 3 site. I have one section with a few entry types. However, when attempting to switch to a different entry type I get a JS error:
Failed to load resource: the server ...
1
vote
1
answer
1k
views
How can I list Entry Types of a single Section?
The following outputs all sections and their entry types, but I'm struggling to work out how I output only the entry types from the "blog" section.
{% for section in craft.app.sections.allSections() %...
2
votes
1
answer
268
views
Showing entries for light switch [duplicate]
So I have three light switches on my blog: 'featured', 'required reading' and 'skills'.
I got the featured section to work with this code:
{% for entry in craft.entries
.section(['etiquette', '...
2
votes
1
answer
736
views
Unable to delete some entries
It is weird that I can delete some entires in the app but some I can't. When selecting specific entry to delete, I don't see the option to delete it. I only have "edit entry" and "view entry". In some ...
1
vote
1
answer
817
views
Get Entries from a specific Entry Type
I'm trying to get all Entries that are from a specific Entry Type.
My Section is "Site".
Which has 3 different Entry Types.
Now I want to get all Entries from the Entry Type "Program".
I'm trying ...
0
votes
1
answer
184
views
How can I show multiple entry types in the same page
I have two entry types in a same structure, I want to get some values from these two types in a same page. Is it possible?
I tried:
{% set entry = craft.entries.section('businessProfile').type(['...
1
vote
1
answer
57
views
How to limit navigation by entry type
I couldn't find this anywhere so I thought I would post the answer. How do you limit the output of a navigation element to a specific entry type.
This question is explicitly for the navigation ...
1
vote
1
answer
73
views
Programmatically Setting Entry Type Via Javascript
At the moment I'm trying to create a script that is supposed to be run (by chrome extension) on page load (of the new entry page) that with automatically set the entry type. The name of the entry type ...
4
votes
1
answer
623
views
Entry Form - Multiple Entries & Entry Type & Parent
I'm building an MVP for a project, I'm using Craft and would like to:
Create an experiment (/experiments/)
Create multiple cages for the animals within the previous created experiment eg. 5 cages - (/...
1
vote
2
answers
986
views
If multiple entry types?
Is it possible to do the following?
{% if entry.type == 'overview' %}
{{ entry.title }}
{% elseif entry.type == ['availability', 'specifications', 'sitemap', 'location'] %}
{{ entry.title }...
1
vote
1
answer
133
views
Create a specific order of paginated entries by entry type
I am working with a design that requires entries to be laid out on a listing page in a specific order based on whether they are "Standard" or "Premium". The order of the paginated listing page is as ...
1
vote
1
answer
266
views
How to render an entry type of a Matrix in HTML?
<a href="{{box.learnMoreLink}}"> {{ box.learnMoreText }} </a>
Currently I have a Matrix field that has two plain-text fields. I want to change the href ({{box.learnMoreLink}}) from plain-...
1
vote
1
answer
85
views
I managed to make an entry type that won't let me create any entries. How can I fix it?
I managed to make an entry type that won't let me create any entries.
The site is for a rock band, and the entry type in question is called "Shows". It contains five fields:
Venue
Lineup
Date
Time
...
1
vote
3
answers
244
views
Redirect to another EntryType template if no Children exist
I have a Structure Section called 'products' which uses two EntryTypes, one for 'Product Type Overview' and one for 'Individual Products', where 'Individual Products' are the children of 'Product Type ...
4
votes
1
answer
296
views
Limit a field to entries by entry type
Is it possible to have an "entries" field but only allow selection to entries of a specific "entry type" within craft?
I'm trying to use entry types as a sort of way to enable interfaces with chunks ...
2
votes
2
answers
540
views
Copy the Entry Type along with its field layout
For a current project, I am attempting to automate the creation of a section.
I am using a default_section as the base of all the others. This section will contain a couple of entries, and a couple ...
2
votes
1
answer
301
views
how to specify entry type on front end entry form?
I have a section with 2 entry types. Logged in users need to be able to submit to each type. I had planned on having 2 different entry forms.
How do I tell the form which entry type to save to? I ...
1
vote
1
answer
2k
views
Checking if a field contains information
I have read docs on Craft CMS site and Googled some related articles but can't seem to get my head around checking for conditions for a field.
For example, if I have a 'Fruit' field drop-down:
Apple
...
1
vote
1
answer
922
views
Duplicate Entry Types into a new section
Is there a way to duplicate Entry Types into a new section? I have a section with many entry types with their fields and handles all named nicely... I need to create a Section using exactly the same ...
2
votes
1
answer
166
views
Entries field won't save/update from plugin, although data seems to be correct
UPDATE:
I have found a workaround for the problem. It's not really a solution to the original problem per se, so I didn't want to mark it as an answer, as the solution isn't optimal in my case. I ...
4
votes
1
answer
487
views
Redirect entry type to another domain
I have an entry type (outsideCourse) that will never need its own page. It only exists so I can manipulate it in various lists of required courses. Thanks to Mats Mikkel Rummelhoff, I have a macro to ...
2
votes
1
answer
365
views
Re-using entry types across multiple sections
Is there way to a create an entry type that you can re-use on different sections?
Essentially what I would like to do is define one entry type, such as a "Product" entry type, and add fields for a ...
1
vote
1
answer
514
views
Matrix vs Multiple entry types
I am building a new website using Craft CMS and I have a requirement from the design team that they want to be able to re-use templates across multiple sections. For example define how a product looks ...
4
votes
1
answer
4k
views
{% if loop.first %} and {{ loop.index0 }} not working with Matrix
I have a problem with {% if loop.first %} and {{ loop.index0 }} with the following snippet:
{% for block in entry.locationSlideshow %}
{% switch block.type %}
{% case 'upload' %}
{% for ...
5
votes
1
answer
953
views
Using multiple sections VS a single section with entry types
I'm just planning ahead for a project and was hoping for a second opinion.
I'm going to be making a site that will have about 7 different types of entry - all of which have different fields/URL's; ...
2
votes
1
answer
1k
views
How to list out entry types in a section
Something like craft.entrytypes.section('sectionHandle') and then loop through them to list out their names. I'm looking through the docs and can't see how to do this with just the craft.entries code....
2
votes
1
answer
421
views
When to add a field to an asset?
I've added a field to an asset which in my case is a fallback image for a video asset.
When uploading a video the field for the fallback image isn't visible so the chances of forgetting to set one is ...
5
votes
2
answers
632
views
A Structure section with an entry to a channel index
I don't have commenting privileges yet, so couldn't comment on either of these posts (here and here) regarding an entry in a Structure section that links to a Channel index. Between the two posts ...
2
votes
1
answer
147
views
Entries not being searched in the control panel
I have a 'person' channel that does away with the title field and instead uses custom fields like so {lastName}, {firstName}.
However, I've noticed that when I'm looking at the entries listing in the ...
0
votes
1
answer
141
views
Channel with URLs based on entry type
Example: I have content which could be separated into Big News and Small News.
The Big News has much text (which would need a link to its own entry). The Small News has only one text block (so it ...
2
votes
1
answer
322
views
What is the handle of a section’s default entry type?
For a section without additional entry types, what would be the handle value of the default entry type output by {{ entry.type }}?
0
votes
1
answer
25
views
Possible to view field handles on entry type field definition page?
When I am configuring the fields for a given entry type, is there a way to see those fields' handles on the same page? I often reference the entry type page to know which fields are associated with a ...
3
votes
2
answers
936
views
Different templates for different entry types within a section
When specifying the URL and template used to render a section, it's possible to set variable URLs using something like /{postDate.year}/{slug}. Is there any way to accomplish something similar for the ...
1
vote
2
answers
613
views
Add custom column to Entry Type index page
I'm creating a plugin and I've been following the Mijingo Craft plugin development videos. I reached the point where a column was added to the entry index page. I was looking to do something similar ...
5
votes
1
answer
1k
views
Managing a large number of Variants in Craft Commerce
I'm currently building a site for a client who's products vary in price depending on the width / height selected. Essentially what this means is each product has around 70 possible variations, each ...
3
votes
1
answer
254
views
Element API: Entry field inside a Channel entry being passed into JSON file
Hopefully my titles makes some sense but I will try to elaborate.
I have a Channel entry called Movies that I am using the Element API to turn into JSON. There is a field inside that called Movie ...
1
vote
2
answers
431
views
Ordering entries by Entry Type
I want to sort entries by Entry Type in the order they appear when you create/edit entry types in the CP (which can be reordered). I can't seem to find an argument for order() that works. Can this be ...
3
votes
1
answer
746
views
How do I filter entries in CP by Entry Type?
I have an entry type called industry and am trying to use this search syntax in the CP to filter my entries by that type:
type:"industry"
I am getting no results whatsoever. How do I filter entries ...