Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Anna Regular
@Netzhexe · Joined 8 years ago · 179 posts · 63 topics · 19 reputation
Badges
Recent posts
-
$page->save() in plugin does not do anything, no errors either
· 6 years ago
I reckon it still depends on the outcome – if it turns out there is a specific, foolproof method for setting dates in the frontmatter programmatically, this could well be of interest to others. But as
-
$page->save() in plugin does not do anything, no errors either
· 6 years ago
Once again I'm finding some time to work on this, and I actually made a sort of breakthrough! But there seems to be some misunderstanding as to what I'm trying to accomplish. So: I would like to autom
-
$page->save() in plugin does not do anything, no errors either
· 6 years ago
An update: I was just confused. I do get an associated file from dump($e->file());, and it is the correct file. So this should not be the issue. Does anybody else maybe have an idea? Or maybe a way
-
$page->save() in plugin does not do anything, no errors either
· 6 years ago
Hello hughbris, and thank you for your reply! Yes, I did stumble over that little if clause as well, but wasn't sure what to do about it. I did not quite realise I could easily check for this by putti
-
$page->save() in plugin does not do anything, no errors either
· 6 years ago
In my Simple Events plugin, I would like to set the unpublish date of a new Event page programmatically. To this end, I am getting a list of all pages with the Event type on a cache rebuild, checking
-
How can I delete a page folder programmatically (in plugin)? thoughts on cron jobs welcome
· 6 years ago
Well hello again, thank you so much for this!! Not only would it not have occurred to me to use the cache rebuild, I could also copy most of your code as-is. Feels like I keep getting Christmas presen
-
How do I get all pages of a certain type in PHP (in a plugin)?
· 6 years ago
Hey there, that is a fair question! I wasn't fully aware of the unpublish_date especially. The thing is, these events can potentially have an end date… also I have set up an extra tab with only the re
-
How can I delete a page folder programmatically (in plugin)? thoughts on cron jobs welcome
· 6 years ago
Hello everybody, in my plugin Simple Events I would like to offer an option to have old events deleted automatically (for my own projects it would certainly be very useful). I have a problem with actu
-
How do I get all pages of a certain type in PHP (in a plugin)?
· 6 years ago
Hello there, thank you so much! This really helped me understand things better, and I quickly built a lovely two line solution: $pages = $this->grav['pages']; $collection = $pages->all()
-
How do I get all pages of a certain type in PHP (in a plugin)?
· 6 years ago
Hey everybody, I feel this should be simple, but I can't make it work. In my Simple Events plugin, I would like to add the option to automatically remove past events. To this intent, I need a collecti