I would like to get the filename of a children()

Hello,

I would like to change a data in a text file from the content folder.
If the date of one of the articles is earlier than the current date, it should automatically change from “featured : no” to “featured : yes”. However I don’t know how could I refer to the filename.
I know that there are a lot of options to get the dates and the others (like $page->children()->date()) but I just would like to get the name of the text file.

This is what I would like to change:

And here is my code:

Thanks for your helping! :blush:

You can’t call a data field on a collection, just on a single page, or you have to filter them by that value and then loop through each individual page. I don’t have time now to provide working code, but will get back to you tonight if nobody else does in the meantime.