Questions tagged [entry-type]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
33 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 ...
user avatar
2 votes
1 answer
118 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 ...
user avatar
0 votes
0 answers
27 views

Testing adding fields to an entry type field layout

I'm writing unit tests for a plugin that reacts to adding fields to field layouts, I'm trying to add fields to a layout programmatically but can't get anywhere, In the example below (method ...
user avatar
  • 31
1 vote
4 answers
59 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 ...
user avatar
  • 23
1 vote
2 answers
56 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 = { ...
user avatar
0 votes
0 answers
72 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&...
user avatar
  • 111
2 votes
2 answers
56 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 ...
user avatar
1 vote
0 answers
519 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 ...
user avatar
  • 213
0 votes
0 answers
98 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 ...
user avatar
  • 13.2k
2 votes
1 answer
313 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 ...
user avatar
1 vote
1 answer
220 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 ...
user avatar
  • 611
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() %...
user avatar
2 votes
1 answer
218 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', '...
user avatar
2 votes
1 answer
629 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 ...
user avatar
1 vote
1 answer
735 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 ...
user avatar
  • 359
0 votes
1 answer
173 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(['...
user avatar
  • 387
1 vote
1 answer
51 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 ...
user avatar
  • 700
1 vote
1 answer
72 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 ...
user avatar
4 votes
1 answer
552 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 - (/...
user avatar
1 vote
2 answers
922 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 }...
user avatar
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 ...
user avatar
  • 1,593
1 vote
1 answer
242 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-...
user avatar
  • 147
1 vote
1 answer
80 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 ...
user avatar
1 vote
3 answers
241 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 ...
user avatar
  • 1,173
4 votes
1 answer
262 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 ...
user avatar
2 votes
2 answers
513 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 ...
user avatar
2 votes
1 answer
276 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 ...
user avatar
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 ...
user avatar
  • 303
1 vote
1 answer
799 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 ...
user avatar
  • 1,173
2 votes
1 answer
164 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 ...
user avatar
  • 839
4 votes
1 answer
436 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 ...
user avatar
2 votes
1 answer
324 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 ...
user avatar
  • 231
1 vote
1 answer
507 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 ...
user avatar
  • 11
4 votes
1 answer
3k 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 ...
user avatar
  • 115
5 votes
1 answer
897 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; ...
user avatar
  • 428
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....
user avatar
  • 1,887
2 votes
1 answer
402 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 ...
user avatar
5 votes
2 answers
620 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 ...
user avatar
2 votes
1 answer
129 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 ...
user avatar
  • 1,713
0 votes
1 answer
135 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 ...
user avatar
  • 3,664
2 votes
1 answer
309 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 }}?
user avatar
  • 23
0 votes
1 answer
24 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 ...
user avatar
  • 391
3 votes
2 answers
891 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 ...
user avatar
  • 391
1 vote
2 answers
600 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 ...
user avatar
  • 203
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 ...
user avatar
  • 389
3 votes
1 answer
251 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 ...
user avatar
1 vote
2 answers
423 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 ...
user avatar
  • 85
3 votes
1 answer
737 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 ...
user avatar
0 votes
0 answers
98 views

Issue with external JS when toggling between entry types

I'm working on a custom plugin / fieldtype, and it requires first an external JS library, and then it needs to be initialized in-page. I.e: <script src="//remote.path.to/my_script.js"></...
user avatar
  • 606
2 votes
1 answer
922 views

How can I programmatically add a tab to entry type?

I'm trying to create a plugin that adds a tab full of fields to entry types but I can't seem to get it working. I tried assembleLayout but that replaced all the fields with my new fields rather than ...
user avatar