Questions tagged [entry-type]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
374 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 ...
2
votes
1answer
106 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 ...
2
votes
1answer
2k views

Impossible to invoke a method (“getUrl”) on a string variable (“60”)

I'm a beginner and don't understand this error, and how to correct it: Template error Impossible to invoke a method ("getUrl") on a string variable ("60") I'm trying to display only the first entry ...
2
votes
1answer
299 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 ...
2
votes
1answer
731 views

Is it possible to create a field group that can be modified across entry types?

Sorry if this is asked/answered elsewhere. I tried to search for it with no success. Suppose I have a common group of fields that I want to include in different entry types, and each entry will have ...
2
votes
1answer
211 views

How to make a separate RSS feed for each entry type of a section?

I would like to make a separate RSS feed for each entry type of a section, for example: http://mysite.com/posts/feed.rss http://mysite.com/videos/feed.rss ...
2
votes
0answers
406 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
3answers
238 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 ...
1
vote
2answers
830 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
3answers
206 views

How do you display entries in a specific (custom) order?

I want to display entries in a specific custom order in Craft. For example entry Id 1, then Id 5, then Id 3. How can I do that?
1
vote
1answer
481 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 ...
1
vote
2answers
575 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 ...
1
vote
2answers
415 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 ...
1
vote
1answer
130 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 ...
1
vote
4answers
43 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
1answer
770 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() %...
1
vote
1answer
616 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 ...
1
vote
1answer
1k 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
677 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 ...
1
vote
1answer
3k views

Evaluating the if statement in entryType

I have this simple the loop, and want to assign a unique code, if condition is met. {% paginate craft.entries.section().type().limit(20) as entriesOnPage %} {% for entry in entriesOnPage %} {{ ...
1
vote
1answer
212 views

Disable Entry Type

I dont want to allow people to post from a legacy entry type but I still want the content that was created with that entry type. Is that possible?
1
vote
2answers
46 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 = { ...
1
vote
1answer
67 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
2answers
468 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 ...
1
vote
1answer
919 views

Display images from Structure

I have a Structure section (galeriesPhotos) with two Entry Types: Albums - the categories on the index.html page Photos - the the actual gallery on the entry.html I'm trying to display the images ...
1
vote
1answer
198 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
43 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
61 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 ...
1
vote
1answer
129 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
224 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
99 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 ...
1
vote
1answer
289 views

Limit by entry type in Matrix field

After a finally returning to an extensive recode of my first commercial Craft based site, I have successfully implemented several new (to me) features from the latest builds. One thing I am making ...
1
vote
1answer
72 views

Event when a sections' entry type changes layout?

Is there a way or an event available to detect changes on the fieldlayout of an entrytype? We've wrote a piece of middleware that needs to be informed of such changes. Thanks in advance, Patrick
1
vote
0answers
390 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
1answer
235 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 ...
0
votes
1answer
128 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 ...
0
votes
1answer
22 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 ...
0
votes
1answer
148 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(['...
0
votes
1answer
205 views

Order of draggable entries and assets won't save [closed]

Hello Craft Community, I have a site which has just over 300 entries but most entries have several asset fields, entry fields, or complex matrices. My problem is that when on an existing entry, I ...
0
votes
1answer
232 views

Output Entry Type and/ or Category

Total noob here. Have managed to output entries and paginate them with this: {% paginate craft.entries.section('woods').limit(5) as entries %} {% for entry in entries %} .... {% ...
0
votes
0answers
61 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&...
0
votes
0answers
84 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 ...
0
votes
0answers
90 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"></...
0
votes
0answers
65 views

Can no longer get the ElementType a field is attached to

I wrote a simple fieldtype that checks that the field value is unique for a specific entry type: https://github.com/fuel-digital/Craft-Unique-Text-FieldType This worked fine initially but after the ...

1
2