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.

64 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
647 views

What's the easiest way to update an entry from the front end as a guest user and only post the data that needs to be updated?

I'm creating a multi-page form on the front end of a site where different data is added to the entry depending on the page they are on. Originally I was going to create the entries using P&T's ...
2
votes
0answers
123 views

Conditionally attach behaviors to craft\elements\Entry by section

I'm trying to conditionally attach behaviors based on an entries section. The following code works fine, but I'm trying to clarify one bit: To avoid a yii\base\InvalidConfigException on the CP ...
2
votes
1answer
470 views

Request must accept JSON in response

I am getting error message while loading entries from dashboard. Please see attached screenshot - While looking into browser console, I found the error message Request must accept JSON in response (...
2
votes
0answers
236 views

Advanced queries with Super Table

I have three channels: Events, stages and artists. An artist is added to a timetable super table field in the stage channel. In the event, I have a stages field where I select stages. Events also ...
2
votes
0answers
36 views

Carry over asset field content to other locales

I have a site with English and French locales. One of the fields we have assigned to our entries is an asset field. Currently when an admin adds a new entry, all the English content will carry over ...
2
votes
0answers
66 views

relatedTo doesn't seem to work when using multiple sections in a craft.entries call

I can do craft.entries.section('mySection').relatedTo(item.id) and it will return the result, so i assumed i could do craft.entries.section(['mySection','mySection2','mySection3']).relatedTo(item.id) ...
2
votes
0answers
49 views

How do I modify the entries table to add a new column?

I've been going through the Craft EntryCount plugin on Mijingo and I've hit a bit of a problem, the way the tutorial shows how to modify the entries table to include the pageviews count doesn't seem ...
2
votes
0answers
594 views

Creating a manageable site structure

Coming from the EE world, when I need a hierarchical site structure along with sections that have channel-type content, I use the Structure add-on for EE. Events, for example, go in a listing channel. ...
2
votes
0answers
63 views

Allow CP sorting on an added EntryTableAttribute

I am adding a column to the entry table with links to reverse related entries: public function defineAdditionalEntryTableAttributes() { return array( 'blockParent' => ...
1
vote
0answers
107 views

How to get an Entry in structure and all of its children and it's children's children with Element APi?

How do I get all of an entry's children using the Element API? I want to return something like: data: [ title: 'Root Entry' uri: 'root-entry' children: [ { title: '...
1
vote
0answers
32 views

Search if Super Table Field Has Rows

I have a section with a super table field, and I only want to display entries in that section if the super table field has rows (so basically a "not empty" search). How do I do this? I tried using the ...
1
vote
0answers
25 views

Filtering Entries based on Amenities (Category)

Hello and thank you in advance. I have a page that lists hotels by region. On the initial load of the page I am able to render all the hotels by region in a tabbed format. This part of the page works ...
1
vote
0answers
48 views

How to display entries by descendants of a particular category slug

I'm trying to display entries (with a category heading) by only the descendants of a particular category slug. So it would be similar to this: Display entries by category (multiple categories) but ...
1
vote
0answers
158 views

How to get url from related entry in another site

I'm relating entries from another site in my installation, and I'm having issues getting the correct URL for the entry. This is an example of what I currently have: {% set carouselEntries = entry....
1
vote
0answers
114 views

How can I create a Module/Plugin to edit multiple entries via a single front-end form in Craft 3?

Scenario: I have a Structure section called Competitions that allows users to submit one or more (usually three maximum) entries to judged photo competitions. However, they can only submit one or two ...
1
vote
0answers
20 views

Excluding entries based on a tag across whole site

I'm trying to exclude entries that are tagged "DO NOT PROMOTE" on any page where craft.entries is used minus their actual entry page. What I've come up with so far is this: public function init() { ...
1
vote
0answers
108 views

Viewing expired entries and live one with the same template

Working with Craft 2, I have a channel for events that each entry has an expiration date. Live entries should show the upcoming event info and expired entries should show archive info. I have ...
1
vote
0answers
883 views

Create an Entry With PHP in CraftCMS3

I am having some trouble when trying to create a new Entry in Craft3 via PHP. In Craft 2, I was able to do something like this: $entry = new EntryModel(); $entry->getContent()->title = $...
1
vote
0answers
37 views

Craft 2: New locale introduction not affecting old entries

I just introduced a new (2nd) locale to my site. It now seems I can easily set up translated versions for "single" and "channel" pages that I set up new. The old entries, which existed prior to ...
1
vote
0answers
534 views

How can I filter with facets in algolia with nested structures?

I have a site that currently uses a structure where we have a parent entry and children under it. On the parent page we have entries that have been created with matrix blocks. The structure is as ...
1
vote
0answers
40 views

chain of random entries based on relations

I'm developing a bio section for a client. Every bio is linked to another bio creating a chain of bios. The order of this chain should be random. The schema would be as following: Bios: Bio a, Bio b, ...
1
vote
0answers
36 views

Shortlist plugin item title not showing

I've been getting annoyed at one small problem I can't solve with the Craft Shortlist Plugin. It seems that I have got everything to work but no matter what I do, the {{ item.title }} just won't ...
1
vote
0answers
83 views

revision entry is the same with saveEntry in plugin

I have made a plugin where I save a status of a related entry. I have enabled revisions in the section. But when I update the status entry, a new version is made with the newest content, but all the ...
1
vote
0answers
131 views

If an entry doesn't exist in a locale and returns a 404, how can I check if the entry exists in a different locale?

I'm trying to create a mechanism for informing users that a particular entry is not available in the selected language, and providing a link to read the article in an alternative language. Therefore, ...
1
vote
0answers
43 views

Attaching a file to a Matrix field and then saving the entry takes up to 2 minutes

I have an issue with attaching a file to a Matrix field and then saving the entry takes up to 2 minutes. If I open up another tab with the Craft CMS admin interface I can see that Craft is performing ...
1
vote
0answers
156 views

Range Facets with SearchPlus and Algolia

Currently using Algolia with SearchPlus on my setup. Unfortunately some data is quite clunky e.g. Prices with 23.93 48.12 etc. What I'm wanting to do is have range pricing/grouping where by I can ...
1
vote
0answers
72 views

Display entries linked from Matrix field according to the entries' structure and a light switch in the Matrix

In a channel (market), I have a Matrix field (market_products) with a Stucture-based Entries field (products) and a Lightswitch field (active/inactive). For each market, I need to create an ordered ...
1
vote
0answers
50 views

Missing entries if order of entries is changed

I'm having a very bizarre problem and was wondering if anyone else has had this happen. I have a page displaying thumbnails of product sheets. My loop code starts with this: {% for entry in craft....
1
vote
0answers
53 views

Return Category from Inside Matrix

I'm having difficulty returning a category from inside a matrix block. So I'm returning a student based on a studentNumber variable {% set studentParams = { section : 'students', '...
1
vote
0answers
28 views

Preserve Structure while searching for entries?

I have Structure type section and each of the entry contain at least 10 level 1 entries. Is there a way to preserve the structure of the entries while filtering/searching entries? What I mean by this ...
1
vote
0answers
176 views

Saving some entries and a matrix field settings takes a very long time

I have some issues with saving fields and entries in Craft. For some reason, some entries, and a Matrix field I have, take approx. 1 to 2 minutes to save. There are then errors in my server log. ...
1
vote
0answers
77 views

How can I disable automatic copy to new localized fields on first save of an entry?

Is there any way to stop this? It would be nice to stop this (for my purposes) and then tell the template to fallback to content from a certain locale if the current locale does not have content for a ...
1
vote
0answers
79 views

Entries relation

I have two entries, let's say A and B. In the B entry I can select multiple A entries in a entries field. I want to get B entries that have specific A entries selected. So i have the code: {% set ...
1
vote
0answers
139 views

How to pull out entries related to multiple nested categories?

I have a category set up with nested categories so: Level1 -level2 -level3 In my entries channel each entry can have multiple nested categories so we may have an entry with: cat1 -...
1
vote
0answers
64 views

Asset saves in Draft but not showing up in Preview - help!

I have saved an asset to the Assets tab in Craft and successfully uploaded it into an article I'm creating. I deleted the picture it was replacing, and then uploaded it. It saves in draft, but doesn't ...
1
vote
0answers
66 views

Entries fieldtype

Is there scope for updating the Entries fieldtype so that only sections editable by the user are shown in the pop-up modal? Obviously don't want to go changing the core files, but some digging ...
1
vote
0answers
135 views

Add entry ids to a session cookie/variable array on button click?

I'm looking for a way to add entry ID's to an array in either a session cookie or a session variable. I've installed the LJ Cookies plugin (https://github.com/lewisjenkins/craft-lj-cookies) in the ...
1
vote
0answers
276 views

Is there any way to create reciprocal related entries?

I'm working on a sign language dictionary project. Each individual sign (or word) is an entry. I want to be able to have an area that shows words that are similar to the word that is being currently ...
0
votes
0answers
19 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
34 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. ...
0
votes
0answers
15 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 ...
0
votes
0answers
9 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 ...
0
votes
0answers
11 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
37 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
51 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": [ { &...
0
votes
0answers
33 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
17 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 ...
0
votes
0answers
53 views

Manually sort entries related to a category in the admin

Is anyone familiar with a way (in the admin) to manually sort the order of entries related to a category? For example, a "Software" entry gets assigned to multiple categories during entry. ...
0
votes
0answers
21 views

Find entries that use a specific block in their Matrix field

I am using this solution to get the latest article with a video. This works great, until I delete the Matrix block in my latest entry with video, then it still finds that entry, but without any data. ...
0
votes
0answers
35 views

Total count of entries related to entry from another section (structure), including all levels within that section

I have two sections: Products (channel) and Accessories (structure). The Accessories section is a structure and can multiple levels to it, a Product may relate to a child (level 2) but not it's parent ...