Questions tagged [entry]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
20 views

Update parent entry `dateUpdated` on child entry save

I got a bit of help with this from Discord. Here is what I have: Event::on(Entry::class, Element::EVENT_AFTER_SAVE, function (ModelEvent $e) { $entry = $e->sender; if ($entry->sectionId !== ...
0
votes
0answers
35 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
23 views

Entries not being related

I am trying to query all entry elements related to a category but I am only able to get some of the entries to show up when I run craft.entry().relatedTo(category) I have a matrix field in the entries ...
1
vote
1answer
49 views

'and' & 'or' in the same entry query

I've been attempting to create an entry query that queries the same custom field twice. Basically I want to check if a custom field is between 2 numbers OR if it is empty. Currently I'm using this to ...
1
vote
2answers
27 views

Display entry data dynamicly in textfield

i have some data in my entry like productnames "Nike", "Puma" etc. which are headings i diplay in my template. {{ productnames1 }} "some text the contenteditor maybe wants do add" ...
0
votes
0answers
26 views

Query Entry where number field is conditional to value

I am trying to get entries where a specific number field is bigger than the given value. But Craft is giving me the following response: Am i missing something or is this not supported for number ...
1
vote
1answer
47 views

Entry query returns all fields with NULL

When trying to query a specific single entry in a section I get back a result but all the fields inside that result are nulled. This {% set kundenmeinungen = craft.entries.section('unterseiten').slug('...
1
vote
1answer
43 views

get next entry with entry.getNext(), based on a multiple category filter

I have a section, where i display a list of entries from a structure. The section is an overview page, where the entries are listed with a picture and title. If the user clicks on an image, a detail (...
2
votes
1answer
52 views

Retrieving entry just after saving it returns null

I'm having this issue where when I save an Entry and try to fetch right away I get a null. Example: $entry = new Entry([stuff here]); $entry->title = 'foo'; if (!Craft::$app->elements->...
1
vote
1answer
28 views

Validation not running on empty custom fields on an entry (when creating programmatically)

I'm trying to save an entry via a controller. They are contact form submission. A few of the fields are required. $section = Craft::$app->sections->getSectionByHandle('contactSubmissions'); ...
1
vote
1answer
19 views

Override entry.url / entry.getUrl() Method

For certain entries I would like to be able to override how Craft generates the URLs to them. So I create an Entry Model in my module extending from \craft\elements\Entry and override the getUrl() ...
1
vote
1answer
30 views

Getting average of number field values

I'm getting close to finishing my first project on Craft CMS but I have one problem. I'm using number fields to rate items in my entries. It looks like this: I will have around 6-7 fields and I need ...
0
votes
0answers
39 views

Entry URLs are not returning URL with locale in the path

I set up 2 sites (locally) running Craft 3.6.7: English (Handle: english, Base URL: '/en/') German (Handle: german, Base URL: '/de/') I've made a blog section that is enabled for both languages with ...
1
vote
1answer
46 views

Why the entry-Variable doesn't exists after search?

I created a search form in my navigation and as it is described in the documentation, I created an search/results.html. And actually it works so far. Now comes the problem: The results.html extends ...
1
vote
1answer
19 views

Dates for entries are in different language

When the user wants to edit the Post Date or Expiry Date of an entry (channel/structure), the calendar is in Welsh language. I have no clue how this happened. How can I change this? Thank you
1
vote
1answer
13 views

Output loop position number

Good Evening, This is probably something really simple, but I need to output the position of the entries in a query within the loop {% set relatedEntries = craft.entries().section('memories').limit(10)...
1
vote
1answer
22 views

How to display an asset (pdf) from both site languages on both sites?

How do I display an asset (PDF) from both site languages on both sites? I would like to offer both German and English versions of a PDF on both the English and German sites. I now have {{ entry.PDF....
1
vote
1answer
184 views

Send email notification to admins when a new entry is created

Anyone written a simple plugin that does this out there? When a user submits a form on the frontend, it creates a new entry (with the default status set to disabled). I'd like to set it up so that the ...
1
vote
1answer
44 views

Viewing Assets (PDFs) associated with an entry directly from that entry screen

I have a channel with an Assets field, designed to hold PDF files. It works fine to select one or more files, and/or upload files and select them. However, I'm wondering if there is a way to view a ...
0
votes
0answers
17 views

When creating a new entry, what controls field focus?

When I create a new entry, I noticed that the focus jumps to a field within the first matrix block. This is not something I explicitly set, I can't find anything in the documentation about what ...
0
votes
0answers
38 views

Craft 3.x Menu : Entry URLs are set by the entry

I can't change the URL? How can I use a custom URL? Here is the link to the image: https://ibb.co/bz9BYnL
1
vote
1answer
282 views

Input and Use Twig Variable in External JS Script Across Different Pages

I have created a _layout.twig file which acts as my base to hold content on the page -> _layout.twig: <!DOCTYPE html> <html lang="{{ craft.app.language }}"> <head> ...
0
votes
0answers
63 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&...
1
vote
1answer
42 views

Where does Craft store HTML Templates?

I have recently been given access to a Craft site's control panel. I need to edit the homepage to add data in the footer. As I didn't create the Craft website, how can I access the HTML I need to add ...
1
vote
1answer
115 views

orderBy title, but remove the word "The" from titles

If I have a huge list of TV shows and Movies, many of them have "The" in the title, meaning they all get grouped together if you order by title. Is it possible to "filter out" a ...
1
vote
1answer
41 views

Help with an Entries field to an array I can use elsewhere

I have an Entries field so I can select a number of posts to feature in a "Hero" section on the home page, as well as a "most popular" section underneath it. However, the Hero ...
1
vote
1answer
378 views

Send entry as HTML email

Looking to build a hybrid news service that publishes to a website but also sends an entry to a mailing list. Has anyone done anything similar?
1
vote
1answer
57 views

Use sequential numbers for entry title

I have a channel where I need each entry's Title include a sequential number, like this: 10003 - Entry Title Is there a way to prepend a sequential number to the entry title?
0
votes
0answers
48 views

Add additional entry fields to backend search

The search field in the craft backend entry section searches the title and slug field by default. Is it possible to add custom entry fields to this search function (in my case e.g. a custom item ...
1
vote
3answers
302 views

How to create a new Entry model in Craft 3?

I want to create a new entry for a section named 'drinks'(having section id= 6). The namespace of the file having this code is namespace putyourlightson\userguide\controllers;.I copied this code from ...
1
vote
1answer
79 views

Impossible to access an attribute on a null variable - on the one() method - all() works!

First question - but I think this is a bug (not my fault). I have entries/pages (a structure) - one parent (product overview) with children (products) I have one category group with categories - ...
1
vote
1answer
55 views

What causes an entry's field to be marked as "modified" when the entry is saved?

When an entry is saved, what causes the entry's individual fields to be marked as "modified" in the POST request? I'm trying to troubleshoot an issue where a modified Redactor field that is a child ...
3
votes
2answers
107 views

Exclude most recent entry type from a loop

Hey everyone I am trying to output entries on the homepage. My goal is that the most recent entry is styled differently. I achieved this by calling the loop too times: {% for entry in craft....
1
vote
1answer
30 views

entry / asset url integrity check

Is there any mechanism in Craft (or a plugin) which protects entries or assets from being deleted, if they are used in an asset / entry field used in an entrytype, global, ...? Or is there a way to ...
1
vote
1answer
72 views

how to output all images in an entry's loop

Unfortunately I'm still very new to Craft, but I have a question to which I haven't found an answer here or in the Docs or the ones I found don't seem to work in my case. I want to output all the ...
0
votes
0answers
28 views

Images won‘t display in an entry loop

Unfortunately I'm still very new to Craft, but I have a question to which I haven't found an answer here or in the Docs or the ones I found don't seem to work: Why doesn't this entry-loop output a ...
1
vote
0answers
40 views

Craft Table/Tabular static entry input field

Is there a way to set up a Craft CMS entry field to have a table with predefined rows and columns? I have tried with the native Craft Table field, but it allows users to add rows or edit default ...
1
vote
1answer
180 views

Fetch Entries with Tags Only

I'm trying to get all the entries which have tags associated with them. At the moment I'm doing: $entries = Entry::find()->with('tags')->all(); and then filtering the results in PHP as ...
1
vote
1answer
544 views

Select specific fields from query

I'm trying to get tags out of the underlying craft DB and serve it as a REST endpoint - however, I'm only interested in exposing the tag id and title, so my data should look like this: {id: 1, title:...
1
vote
1answer
53 views

How html title is generated in entry index page in CP

I am trying to find out how HTML title is generated in entry index page in Control Panel. i know it is generated in src/templates/_elements/element.html file by $this->hook('cp.elements.element',...
1
vote
2answers
99 views

Specific entry type in entry field

This seems like an easy question to answer but I can't seem to figure it out... I'm sure we could do it in Craft 2. Anyway, I'm trying to figure out how to only display a certain entry type in an ...
1
vote
1answer
86 views

Get entries related to selected category only and not it's ancestors

The following is using commerce product entries, but I'm reasonably sure it could be any entry. With the following category taxonomy: - Category 1 - Category 1A - Category 2 - Category 3 ... If ...
0
votes
0answers
33 views

Editing Entries are not working

I am not sure if anybody has come across this, but after clicking "Settings" in the Admin Center all of my "Pages" entries are un-editable. When I click to edit them, all that shows is the title, the ...
1
vote
1answer
28 views

Pulling blog entries related to a structure entry field type

fairly new to craftCMS. I've wrestled with this now for hours and exhausted all research avenues. I have three main "service pages" (Web Design, Digital Marketing, Hosting & Analytics) These are ...
2
votes
2answers
376 views

Change entries URL?

In ExpressionEngine was a URL field under the title field that was filled when writing the title. It was possible to change the URL to something else. Also if i want to change the title of an entry ...
1
vote
1answer
50 views

When I try to edit an entry: "Unable to find 'craft\services\EntryRevisions'"

I have just moved my site onto the live server and imported my local db. It is a multi-site setup. In the Entries section of the CP, when I click on an entry to edit it I get the following error page:...
1
vote
1answer
163 views

Entry form with field translated accross multiple sites

I've got 2 sites, each with a locale (dutch - nl & french - fr). I've set up a frontend entry form that works nicely for all not translated fields, I am however struggling to get it to accept ...
1
vote
1answer
178 views

Unique URI error

I am getting the following error when trying to save a structured entry: Could not generate a unique URI based on the URI format. Title of entry is: Hells Gate Mud Bath & Spa Slug: hells-gate-...
1
vote
2answers
270 views

Get entries after a certain time

I am trying to get all entries from my events section in Craft 3 that occur after 17:00. My current code is: {% set events = craft.entries.section('events').eventStartTime('>= ' ~ '17:00'|time )....
1
vote
1answer
205 views

How would you show a specific entry 'and' its children

I'm creating a footer menu and want to show an entry id and its children, atm I'm just getting the descendants but struggling to show the parent and children as well <nav class="cell small-12"> ...

1
2 3 4 5 6