We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [entry-type]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Flexible List Template for Entry Types

Not sure what I'm missing here or maybe it's not as simple as I think it is, but I'm trying to create a listing template for entry types and I don't want to create a template folder or file for each ...
0
votes
0answers
42 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
1answer
86 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
1answer
106 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
1answer
289 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
1answer
108 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', '...
1
vote
1answer
207 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
1answer
344 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
1answer
104 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
1answer
40 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
1answer
51 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
1answer
365 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
2answers
512 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
1answer
92 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
1answer
175 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
1answer
64 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
3answers
198 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
1answer
126 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 ...
1
vote
2answers
340 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
1answer
196 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
1answer
768 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
1answer
483 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
1answer
147 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
1answer
313 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
1answer
251 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
1answer
390 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
1answer
1k 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
1answer
689 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
1answer
895 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
1answer
312 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
2answers
527 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
1answer
69 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
1answer
113 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
1answer
250 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
1answer
21 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 ...
2
votes
2answers
786 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
2answers
430 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
1answer
858 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
1answer
210 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
2answers
385 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
1answer
629 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 ...
0
votes
0answers
85 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"></...
1
vote
1answer
707 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 ...
3
votes
1answer
294 views

Can Section access be restricted at Entry Type level?

I have a structure section that is driving the majority of a site, which works great with multiple entry types letting us handle different needs across different areas of the site. The client now ...
2
votes
0answers
334 views

Checking if a value matches an entry type handle

I am trying to check if a value provided by the user (url segment) matches an entry type, and if not redirect to 404. {% set section = craft.sections.getSectionByHandle('shop') %} {% set entryTypes = ...
1
vote
1answer
120 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 ...
0
votes
1answer
220 views

Error while trying to use dynamic routing to pass variables to the template and using them

So i'm trying to pass the variables from a dynamic route to a template and then to use those variables to filter trough entries. the catch is that the same template is used to display an "organic"(by ...
2
votes
1answer
484 views

check if a route segment matches a section entry type

So i added a route to a template that shows entries by entry types. the way the template does it is by taking the last segment of the url, and using it as an entry slug for this filter: craft.entries....
1
vote
1answer
69 views

Is it possible to create a page that shows only a specific post type with its own url?

I have a website with a shop section with the following URL structure: homepage/shop/category/the-product. I would like to add a page after the category to filter between post types within that ...
4
votes
1answer
504 views

Set Structure Parent when creating Entry in Plugin

I have Structure-type Section for entries and want to pragmatically populate a large list of multi-tiered entries. I see you can create an entry like: $entry = new EntryModel(); $entry->...