Questions tagged [entries]

Entries hold the content that you want to display on your web pages. Each entry has an Author, a Post Date, an Expiration Date (if desired), a status (enabled or disabled), and, of course, content.

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

Entry Looping Template With Javascript and 500 Internal Server Error

I'm working with a looping mechanism in my Twig code that loops through entries and displays them for a kiosk type of application. The loop itself works for the most part, although after a few hrs, it ...
1
vote
1answer
24 views

Get entries which are not related in to another section

My scenario is I have entries in sectionA these are related to entries in sectionB. I want to be able to show all entries from sectionA which are not related to any entry in sectionB. SectionB has an ...
2
votes
1answer
36 views

How can I query entries related to another section’s entries having specific Matrix checkbox field values?

Let’s say I have a site with two sections: Things and Colors. Things has a Matrix field (thingsBlocks) with a Sizes block type. That Sizes block type has a checkboxes field (sizes) with values that ...
0
votes
0answers
9 views

How to select entries based on site group?

I have multiple sites with multiple languages. In Craft 3, each language is a separate site, we can group them by site group. For example, In the USA site group, I have USA - English and USA - Chinese....
2
votes
2answers
182 views

Get array of titles instead of whole collection of entries' attributes

I know that to get the entries I can do: craft.entries.all() but instead of getting the whole collection of entries, I would like to get an array of titles from those entries (or any other field). ...
0
votes
0answers
18 views

Unique uid across sites?

Are entries' uids unique across all sites in a multi-site setup? I use Craft CMS 3.7. I couldn't find anything about this question in the docs. Many thanks Christian
0
votes
1answer
50 views

Why can't I see my programmatically-created Entries in GraphQL/GraphiQL?

I am using a module controller to create Entries, like this: $personEvent = new Entry(); $personEvent->sectionId = 6; $personEvent->typeId = 1; $personEvent->authorId = $user->id; $...
1
vote
1answer
24 views

What's the best strategy for products that are sold?

I wonder what's best practice for products that are sold? My strategy is to add a lightswitch "sold" and don't display sold products on the website and in the sitemap.xml, in the hopes that ...
0
votes
1answer
44 views

Find related entries by specific position in the entries field

I'm looking for a way to limit a reverse relations query to only match the first selected entry in an entries field. Some context: I have two entry types, institutes and offers. Offers have an ...
0
votes
0answers
37 views

how to retrieve any/all related entries?

I have list of banks(institutions) that each one has branches. I'm using GraphQL API. By the bellow code I can get the branches with associated bank(institutions): query branches { entries(limit: ...
1
vote
1answer
17 views

Creating a channel (or entries) using a similar channel

I am currently trying to make a channel called "classmates" similar to a channel that is called "News". I have this working beautifully, but I am not sure how to set a different ...
1
vote
1answer
46 views

Can't get a Single

I am trying to get a Single. But it doesn't seem to work. Does anyone know what I am doing wrong? I already double checked the slug, and getting normal channels is also no problem. This is the code I ...
1
vote
1answer
239 views

How do I write a GraphQL query to search through sub-entries/entries as fields and return the whole entry?

So I have a fairly complex section structure that (on an Entry Type) has a matrix field that contains entries as fields(sub-entry) within a blocktype. I'd like to write a GraphQL query such that when ...
1
vote
1answer
25 views

Twig Template spits out jibberish when trying to access user-defined fields

I have an Entry called Groups (I'm wondering if this might be some sort of reserved word issue) and, with Twig, I can bring out the base fields of id and title with no issue but when I try to pull ...
0
votes
0answers
30 views

Failed to publish entry when the autosave is not yet complete

When I publish an entry with that has Neo field, after I editing the Neo field and I click publish before the autosave is complete, the publish will take very long time and even gateway time out. This ...
0
votes
0answers
45 views

Split categories by levels / List categories merged by name

I have a scenario where I need category levels (4 levels) split in different sections of the page, also some categories have the same name, I explain: I need to list entries based on a category group ...
0
votes
1answer
33 views

Commerce search: return products containing keywords in related entries' fields

Craft CMS 3.6.11.2 / Commerce 3.2.17.4 We have a Stores structure section that contains fields (searchable) such as phone, address, etc. These Stores are assigned as Entries (searchable, max of 1) to ...
0
votes
0answers
67 views

Search Entries by Post Date

Is there a way to direct Craft to include entry.postDate in the search? I'm using a simple query to search entries. {% set entries = craft.entries.section('mySection').search('*' ~ query ~ '*').limit(...
4
votes
1answer
77 views

Modified A-Z grouping

I'm trying to output the alphabet where certain letters are enabled/clickable based on whether any entries from a specific section start with that letter. Here's the UI: Getting the A-Z is easy ...
1
vote
1answer
39 views

How to Auto-generate a Title based on a multiple entries titles? (using a Entries field type)

I have two sections (both Channel type): Releases Movies Releases have one Entries field type, the source is Movies So, I want Auto-generate a Release title from Movies, like this: Titanic, Avatar, ...
1
vote
4answers
49 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
32 views

Remove expiration date field from section / entry type

By default, every entry has an expiration date field allowing the editor to expire an entry. I'm currently working on an application with some sections where expiring an entry doesn't make much sense ...
1
vote
1answer
84 views

Entries Overview: Add Field Columns

Does anyone have an idea how I can add columns in the entries overview? Columns with the title of the fields that exist in the page and are filled with content. Thank you
2
votes
2answers
132 views

Filter Entries by Matrix Block

I have a matrix field with two block-types ("sound" and "video") I want to get all entries that have a matrix field with a certain block-type. At the moment I have: {% set entries =...
2
votes
2answers
51 views

sort by checkbox field with multiple options and by postDate desc

Section handle: players field handle: teamName The checkbox field has two options: Cubs Tigers Not all players will have the teamName field checked. I want to order players who are Cubs or Tigers ...
2
votes
1answer
96 views

How to structure data: Solo Events (Lectures) and Group of Events (Conferences)

I am working on my first craft project and am wondering how to create the following data structure: I have a page with a large archive of solo-events (lectures, discussions etc). I think I will use a ...
0
votes
0answers
23 views

Entry list field get duplicated entries from specific section

I have some weird behavior when I have an entry list field (in a super table, but I get the same behavior from the native entry list field type). When I select an entry from a certain section, it will ...
0
votes
0answers
35 views

How can I get field values for the sections that I created

New to Craft CMS. We decided to make Craft headless and have an api fetch the data. I have 5 (simple) sections that represent 5 pages and they all have some fields in them with some texts or images. ...
1
vote
1answer
35 views

Output Channel entries on another page with a matrix block

I know im doing something small wrong but I cant see what at this point. I have a channel called 'testimonialEntries' and I want to randomly output one of these entries on seperate pages. I cant ...
0
votes
0answers
25 views

Sort by entry type in admin?

I want the list of entries in admin to allow sorting by entry type. It can sort by any arbitrary field, but not entry type or author (for some weird reason). Is there any way to modify that without ...
1
vote
1answer
23 views

Whats the best way to place content without using a lot of categories?

I have a technologies magazine and recently find out about Craft CMS. It looks like I can make everything that I need to but I need advice. So basically we are writing about smartphones, cars, ...
1
vote
1answer
52 views

Listening for Change at Entry Save

I want to send an email if/when an entry is saved with a lightswitch switched on after previously being off. I have the below code in my plugin's init file, but I don't know how to check for the ...
0
votes
0answers
10 views

Batch check date and alter entries

Good Evening. Im looking for a way to regularly check a full section of entries to see if a date has been passed. If it has I want to place a checkbox marker within that entry. Has anyone come ...
1
vote
1answer
29 views

Find entries with multiple start and end dates from the same date field

I've got a front end form where a user can select multiple months to find entries with dates in those months. I had code that does that for one month, but now I need to expand that to multiple months. ...
1
vote
1answer
68 views

How do you save custom fields on an EntryFixture?

I can't for the life of me figure out how to setup EntryFixtures in craft to populate with custom fields. I'm using the project config which already has the sections and fields defined in my tests. I'...
0
votes
0answers
14 views

Working with content of HTML <meta> http-equiv Attribute in extending main layout template

I am extending the meta of my main layout template in one page only, utilizing the technique explored in some depth here. How do I add an HTML block from template extension to main layout template? (i....
0
votes
0answers
41 views

Multiple structures sharing the same entries?

I'm working on a site that currently has one structure ("projects") that organizes my entries for each specific project. In the admin I can reorder these entries manually... so far so good! ...
0
votes
0answers
146 views

GraphQL returning array on entries field with limit set to 1, instead of 1 object/entry

If I do a GraphQL query on an asset (entries field type, limit set to 1), I get an array in return. Even if I limited the asset to just 1 in the field. So my GraphQL returns: "image": [ { &...
1
vote
2answers
23 views

Associating multiple FreeForm entries with a single Craft entry

I have a Freeform which collects information on item(s) to be converted from analog to digital (VHS tape 16mm film, etc). The form requires the user to be logged in. There may be cases where the user ...
1
vote
1answer
308 views

Filter entry query by a custom field value

I have a channel, 'pages'. Within that channel is a dropdown 'navigation'. The values in the dropdown are 'mainNavigation' and 'hidden'. I'm trying to set an entry query that only pulls entries where ...
0
votes
0answers
36 views

Why aren't my images displayed on the homepage

Our homepage.twig is a section Our Matrix is called "angebote" (it's german don't ask :D) We created two entries for our matrix This is our Code inside the homepage.twig file for including ...
0
votes
0answers
27 views

What's the best way to add a copy to clipboard button to the Preview / View button group in the entry editing UI?

View and Preview buttons work fine, but I want editors to be able to easily share links to drafts with others. The nicest solution would be a Copy button which would copy the preview URL to the ...
1
vote
1answer
35 views

no entries or files visible

I got given a db dump using Craft 3.5.16. After installing all the dependencies using composer and npm I can login to the admin section. However, I do not see any entries or any files in the admin ...
2
votes
1answer
44 views

Getting entries excluding the first

I'm trying to set up having the first entry pull in and then later down the page pull in the remaining posts (as I need to break the loop with other content). I'm a little unsure how to set up pulling ...
1
vote
1answer
60 views

Query for multiple date ranges on a date field

I'm able to successfully query a date field for a date range using this syntax: {% set entries = entries.startsOn(['and', '>= '~firstDay, '< '~ lastDay]) %} What I would like to do however is ...
3
votes
1answer
288 views

Rendering pages from Craft CMS as static HTML

Has anyone tried creating a process whereby the pages/entries generated from Craft could be presented as static HTML? I am keen to know what different approaches have been taken in the past as we are ...
1
vote
2answers
87 views

Convert string to date format that can be used in a craft.entries tag

I've got a date string from the url in this format: "2021-06-01" (year-month-day) and I want to find entries that have a date in the year and month from that string. The date is a date field ...
2
votes
1answer
19 views

Passing null values to queries, Sprout Reports

In Sprout Reports, I am creating a list of users in my settings file. I first need an option with value of null. {% set options = [] %} {% set options = options|merge([{ label: 'All users', value: ...
1
vote
1answer
85 views

Fetch pending entries with GraphQL

I'm setting up Craft to be used headlessly with a mobile app, and content will be created several days before it is published. I want app admins to be able to see upcoming/pending entries. Is there a ...
1
vote
1answer
39 views

Pull Matrix Block from Multiple Entries without Showing Duplicates

I have a set of entries I am pulling ID. (group) Each of those entries has a Matrix Block. (people) That Matrix Block Type (person) has an entries field. In some cases the same entry (person) is ...

1
2 3 4 5
19