People who code: we want your input. Take the Survey

Questions tagged [entry-type]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
9
votes
1answer
3k views

How do I add a subcategory to the URL slug for a channel entry?

I'm trying to mimic the URL structure exactly how I have it in my old CMS. If I select an entry to have both a category and subcategory I would like to have the subcategory in the URL along with the ...
8
votes
2answers
3k views

How do I display entries from multiple entry types?

I have a 'teacher' channel section on my site. That channel has three entry types, 'teacher', 'demoTeacher' and 'guestTeacher' - how do I display entries from teacher and demoTeach combined? At the ...
4
votes
1answer
1k views

Get next entry based on entry type

As an extension of this question How to link to previous/next entries in a section? If my page is set to automatically provide a entry var in my template. And I can simply access a field like this ...
3
votes
1answer
634 views

Linking to channel via structure section

I apologize for opening up a whole new question for this topic since it's been discussed a few times now, however I don't have enough rep yet to comment on the existing questions. Regarding the ...
4
votes
2answers
5k views

How do I create a link to an entry using entry's id?

This is a beginner question: How do I create a link to an entry using entry's id? I tried several combinations, such as {{ entry.getUrl(my_id) }}, {{ entry.url.id(my_id) }}, etc. but failed to found ...
4
votes
1answer
492 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 - (/...
9
votes
3answers
3k views

Entry Types Custom Slug

The website I'm working on has different sections and each section different types of entries. I would like the types of entries to be shown in the URL. I have followed this tutorial to do so. In a ...
2
votes
1answer
871 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 ...
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 ...
7
votes
1answer
895 views

Using an IF-statement to define the Entry URL Format

Within a channel I have two kinds of possible article types, which I separate with the entry type feature. For the entry URL format I want to include the type, but only for one of the two. I've tried ...
4
votes
2answers
665 views

Can I use translated properties for URL formats

Here's my scenario. I have a structure section: "events". Within that I have three entry types: "events", "exhibitions", "specials". I would like the events to follow the following URL structure: {...
2
votes
1answer
371 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
0answers
404 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 = ...