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.

66 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
670 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
150 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
566 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
267 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
38 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
609 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
64 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
28 views

Querying entries that have not been related to any other entry or contained matrix element

I have a large amount of content that we are attempting to collect before we migrate to our new site structures. Normally the staff are supposed to relate content back to main entries to make sure ...
1
vote
0answers
135 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
41 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
26 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
53 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
178 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
127 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
21 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
117 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
1k 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
564 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
144 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
160 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
54 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
29 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
199 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
83 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
144 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
67 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
140 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
279 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
7 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....
0
votes
0answers
16 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
0answers
36 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: ...
0
votes
0answers
25 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
44 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
0answers
55 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(...
0
votes
0answers
22 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. ...
0
votes
0answers
22 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
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 ...
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....