Questions tagged [entry]
316 questions
4
votes
1 answer
How to track entry visit?
how do I able to track the visit number of entry?
Something like track view in Expression Engine.
I have try to find but don't have any source.
Hs Tung
- 367
- 2
- 12
2
votes
2 answers
Auto Expire on entries
I need to automatically set the expire date of a new entry (only) from a specific section.
I know that it's possible to do this via the frontend twig templates, however I need the user to have the flexibility to change the date from the default…
dave_agilepixel
- 309
- 1
- 10
2
votes
1 answer
How to create manually an Entry from command line
I would like to migrate content from external source to my Section model. So I have to create Entries manually. Is there any better way to do this beside this snippet from the documentation:
$entry = new Entry();
$entry->sectionId =…
Visky Máté
- 359
- 1
- 11
1
vote
1 answer
Getting an entry's last editor
How do I get the last editor of an entry on the front end? There are answers to this question here, but they relate to plug-ins. I'd like to access the information directly.
{{ entry.author.username }} returns the original author, but I need the…
4midori
- 656
- 6
- 22
1
vote
1 answer
Why does the same code work on one page and not on another
I have a Faq page with an accordion, and it works perfectly, yet I have two identical pages in the same faq folder with the same exact code but it only works on the index.twig and not on the other two pages. On all the pages I have under the Faq a…
user1837279
- 31
- 1
1
vote
2 answers
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 !== 7) {
return;
}
if ($entry->typeId !== 9) {
…
mupoftpr
- 13
- 3
1
vote
1 answer
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');
$entry = new Entry();
$entry->sectionId =…
good_afternoon
- 319
- 1
- 10
1
vote
1 answer
How can I find entries that link to a given entry?
I'm retiring a section of my website and want to remove all existing internal links to this section. Is there an existing way to find any links to each entry in that section?
These links are all in Redactor fields (eg. inserted via the toolbar), and…
Matt Andrews
- 247
- 1
- 8
1
vote
1 answer
New entry showing under old one
I'm working on a website that was developed by someone else before me, I added a new section and template, I uploaded all my files, created my new section and field and created my first entry everything was looking good, I decided to add a second…
Azazel
- 101
- 6
1
vote
0 answers
Share: Getting 'Forbidden' message when sharing externally
I've run into an odd issue and I can't seem to figure out what is going on.
Normal Process:
I click the Share arrow on a disabled entry.
I copy the tokenized link and send it out.
Folks without accounts are able to preview the page.
What is…
craftyguestsjt
- 11
- 2
1
vote
2 answers
How to limit the amount of entries that is output when limit doesn't work
I'm trying to limit the amount of entries on my page.
Currently I want 1 news entry (based on if the checkbox is ticked, there could be 10 entries with the checkbox ticked but I only want to show 1 (the latest)) The issue is that the limit() twig…
Davabo
- 67
- 6
1
vote
1 answer
Is it possible to view entries in admin panel list view with specific field?
I want to add a checkbox field to all my entries.
But the key factor being that if 3 entries from 100 have this checkbox enabled, the 3 entries will show in the list of 100+ entries with a specific colour/sign/ anything really that makes it stand…
Davabo
- 67
- 6
1
vote
1 answer
Possible to filter an entry based on property?
Trying to pull in a limit of 2 events that are upcoming (so the event's eventDate should be newer than today). I currently have this:
{% set entries = craft.entries.section('events').order('eventDate asc') %}
{% set today = now|date('Y-m-d') %}…
dace
- 241
- 2
- 9
1
vote
2 answers
How can I copy an entry?
How can I create a plugin that will let me copy entry?
I found this question but don't have a good answer.
huang jimmy
- 11
- 1
1
vote
1 answer
How to Make a Change to an Existing Page Go Live at a Particular Point in Time
In Craft, is it possible to make an edit to an already existing (live) page but be able to set a particular point in time that you want to change to go live?
I know that you can set the post date and time for when you're implementing a new page but…
dpayne
- 659
- 6
- 14