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
-1
votes
0answers
14 views

Still no way to filter by category in Control Panel?

I'm wondering if, with the release of Craft 3.5, there is a way to filter by category in the control panel. I see this request goes back several years. The only workaround I can find is to use a ...
1
vote
2answers
27 views

Order Entries Query by a Featured Light Switch

I have a case studies filter that allows you to filter case studies by category. I've attached a light switch field called 'featured' to the entries that allow you to set it as featured. The idea is ...
1
vote
1answer
28 views

Looping on the User Field added to Entry

I am fetching the fields of an entry in a block but can not draw through a user field named as eventHost. I get error 'Variable "name" does not exist.' What is wrong with my loop? {% set ...
1
vote
1answer
34 views

How to automatically remove entries after a certain time?

I haven't found anything similar to this. But I was wondering if it's possible to delete certain entries after a certain time? For example: User fills in form and adds contact entry - after 2 weeks ...
1
vote
1answer
13 views

Using a Matrix field to create a homepage that shows entries from sections and categories

I have set up 3 channel types - A, B & C and a Category. Each entry type shares the same pool of categories. On the home page, I have created a Matrix field (homeSections) with a block type ...
1
vote
2answers
27 views

Offset setting a limit?

If have this in a template: {% for mainLink in section.links.limit(4).all() %} {% endfor %} {% for secondaryLink in section.links.offset(4).all() %} {% endfor %} Which I thought would show the first ...
2
votes
1answer
91 views

How to check an entry is in a section within a for loop

I need to display different information depending on the section the entry comes under when I'm displaying all entries within a loop. Use case - I have a feed which will pull in all entries such as '...
0
votes
0answers
25 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
2answers
40 views

How to use entry data?

My question: How can I use entry data in the craft backend? An example for the use-case: Author creates an entry for the section "Generate item". The entry has only a title/single word. ...
1
vote
1answer
62 views

Work with data/content from entries

I'm usually working on Backends with PHP and ZF/Laminas. Now I'm building a headless (only Backend) Craft CMS website and have a couple of questions that I didn't find a clear answer on. The Craft ...
0
votes
0answers
27 views

How do you eager load or join reverse relationships for entries?

So I have structures that are related in the follwing way: Locations has many Providers Providers has many Health Topics I know that I can eager load all Locations with related Providers and Health ...
1
vote
1answer
13 views

Channgel entry to disabled

Is it possible that when my user adds a new entry in a channel on the English site, it gets copied to the channel of my Belgian site, but this entry is set automatically to disabled? So my English ...
1
vote
1answer
35 views

Problem with Twig group function, group by year

I am trying to apply the group filter so that my year headings appear in DESC order. They are appearing in ASC order instead, and applying |reverse doesn't work. Suggestions? {% set entries = craft....
0
votes
0answers
19 views

Toggle related entries visibility/status - custom field?

I appreciate this is a bit of an edge case... While viewing an entry, you can double click on related entries to view and modify them without having to leave the original entry's view. The one thing ...
0
votes
1answer
25 views

Making changes to existing page - how do I make a draft page first?

I'm making extensive updates to our homepage. Before I dig in, I want to confirm the steps to create a draft without overwriting the existing page. Select the entry that requires changes Select "...
1
vote
1answer
14 views

retrieve matrix data to twig file

I create a section clientSection which I linked an matrix field like in this image: The field has two block types : clientImage which has an field clientImage and clientDescription which has an field ...
1
vote
1answer
28 views

Looping through element queries directly has been deprecated

on the template _events.twig {% include "./components/_listing" with { entries: craft.entries.section('events').orderBy('eventStartDate ASC').limit(3), columns: 3, heading: 'On this month', ...
0
votes
0answers
34 views

How to allow multiple entries to have the same slug?

Users create an account and their profile (domain.com/userName) is a template pulling info from craft users. Each user can create entries, all stored in a Structure section (domain.com/userName/...
1
vote
1answer
22 views

Struggling to get Entry index number so I can output “X of Total Entries”

I have a channel which has multiple entries in, I'm trying to output the current entry number, for example "1 out of 20 posts" Currently this is what I am working with: {% set total = craft.entries()...
0
votes
1answer
33 views

if statement in a template not working

I am making a condition to use a certain template for a specific article category, but it's not working and giving me an error. {% extends "_layout" %} {% set title = category.title %} {% block ...
0
votes
0answers
18 views

Can't see changes when editing template file

I am new to Craft. I have a website needs some modifications. I have the homepage using a template called home5. When I make any changes to the file I can't see it on the homepage. For example, I am ...
2
votes
1answer
25 views

Global Site Variables (Static Page?)

On various Craft sites, I've needed to provide my clients with access to certain variables used across the site. Things like open hours, specific seasonal color palettes, on / off operation toggles. ...
0
votes
1answer
13 views

Is it possible for an assigned entry (via field type Entries field) to know what it has been assigned to?

I have two entry types 'pipeline' (structure) and 'series' (channel). I know I can add children in a structure, but I want to keep 'pipeline' and 'series' separate to avoid duplication, as a series ...
0
votes
0answers
35 views

Remove an entry's parent via a Craft Plugin or Module

I'm trying to remove/unset the parent from a module, according to the docs it seems like this method should do it: https://docs.craftcms.com/api/v3/craft-base-element.html#method-setparent. However, ...
1
vote
1answer
28 views

Unable to create a “Single” entry

I haven't made a new single in a few years, it seems. Now when I try to create one, there is no option to do so. Normally, the New Entry button seems to be split, with the left part directly creating ...
1
vote
1answer
18 views

Not triggering SEOMatic on save element

I'm writing a module that loops over lines in a CSV file to save them as entries. For every entry I save with elements->saveElement($element);, SEOMatic will queue a job that regenerates the ...
1
vote
1answer
79 views

list entries by category, including uncategorized entries

I have a channel that is essentially a list of companies participating in an event. Within that channel is a category group of sponsorship levels. Companies that are sponsors are assigned a ...
1
vote
1answer
30 views

Conditional fields based on structure level

I have a site that will heavily rely on the structure entry type to allow the client to publish content. The "1st" level of the structure will always act as a table of contents for its children. The ...
1
vote
1answer
23 views

entry edit no other content area unless title?

I am a newbie of Craft CMS. I installed it on my localhost. I added a few sections and fields to test it when I go to Entries, create and edit the entry, there is just a title input area? Is that ...
1
vote
1answer
26 views

How to query in MySQL all entries with related categories

I have a custom product grid not associated with Craft Commerce. I am wondering, how can I query, in the SQL database, all entries and their related categories?
1
vote
2answers
53 views

Add user to entry user field [RSVP to Event]

I'm trying to add an RSVP button for users to register their attendance at my events. Once they click the button, I would like them to be added to a field called eventAttendees on the event entry. My ...
2
votes
1answer
36 views

A Streamlined Way to Export / Import Entries Between Environments?

Do any of you have a preferred workflow for exporting entries to be imported into another installation of Craft using plugins or migrations or other processes? I'd think this would be a good job for a ...
1
vote
1answer
28 views

Craft CMS shows disabled entry page

Entry is disabled https://monosnap.com/file/l8tgvr5Fxpw0OXPbpcwiI57JmZjL51 But despite that on its address I see its template loaded only without entry data. I expected to see 'Page Not Found'.
1
vote
1answer
79 views

Event when an entry is enabled

I've been looking for an event that get triggered when an entry is moved from a disabled to enabled status. Currently I'm trying to find it through the EVENT_AFTER_SAVE_ELEMENT event but I have no ...
2
votes
1answer
37 views

Don't output specific category on entry page

With {% for category in entry.categories.all() %} <a href="{{ category.url }}">{{ category.title }}</a> {{ not loop.last ? '| ' }} {% endfor %} How do I exclude a specific category ...
1
vote
1answer
58 views

Categories or Structures: Most efficient way to organize FAQ sections

Working on a plan for a site that has multiple audiences, with a FAQ section for each audience. FAQ entries are organized by Topic (Finance, Advertising, Publicity) each FAQ entry can be ...
1
vote
2answers
63 views

Displaying one site's content in another site (Craft 3 Multi-site)

I've got a bunch of entries in Site 1. I need to display them in Site 2. If I specify the site, I get the entries. {% set entries = craft.entries.section('cenicNews').site('cenicOrg').limit(10) %} ...
1
vote
0answers
51 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
1answer
28 views

How does a CMS work ? How to add articles and manage them? [closed]

I would like to design a news outlet website, if that's the correct name. I've drawn a little sketch and I have a pretty good idea about the user interface; things like the site logo, nav-bar, ...
1
vote
1answer
24 views

Replace # with entry.title

Good morning and thank you in advance. How can I replace '#' with the entry.title. I have tried everything and I keep getting hash errors. Current code is this: <h3>{{ wordBoldTitle|replace({'#'...
1
vote
1answer
53 views

How to build a web page using different sections created in Craft

I am a beginner in Craft. I have a Craft website. There is an HTML design with me. From admin, I divided the HTML into sections and created entries based on that. All the coding related to each ...
1
vote
0answers
69 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 ...
1
vote
1answer
100 views

EVENT_BEFORE_SAVE_ELEMENT Saving element loop in task/queue

I'm calling EVENT_BEFORE_SAVE_ELEMENT to trigger a task that then updates the entry, but it's causing a loop? The event is triggered when a specific entry type is saved: Event::on( Elements::class,...
0
votes
0answers
27 views

Manual Search Index

Any time after i use import with Feed me plugin Craft run updating search index, it takes so long time. For example in my new import have 2-3 articles, updating start index all my entries, i have ~50k....
0
votes
0answers
97 views

Filter entries by custom date field

I am trying to filter entries by a date range using a custom field and finding it more difficult than I think it should be. I have found the following two questions that seem similar: How to display ...
1
vote
1answer
32 views

Create entry from template / UI without a form

I need to create an entry from my UI after the user triggers a particular event on the page. I want this to happen automatically and not rely on the user to submit a form. Is there a way to create ...
1
vote
0answers
20 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 ...
2
votes
2answers
212 views

Craft 3 version - How to get entries related to current category only (not children)

I need some help with syntax on this for Craft 3, please. I want to use this piece of code: {% set fruitEntries = craft.entries.relatedTo({ relatedTo: catP,id: 'and, not '~str }) %} from this ...
0
votes
0answers
20 views

Character Limit incorrect for international characters

I've been running into errors importing specific entries in my custom module. Boils down to an issue with the Character Limit on the Plain Text fieldtype when importing international characters. It ...
0
votes
0answers
23 views

Display Multiple Sections With Different Filters

I have one section called webinars where the entries work like events so there can be pending, live, and expired entries. I have another section called resources which are more standard entries where ...

1
2 3 4 5
18