Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include modulars for last modification date computation #3562

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

drzraf
Copy link
Contributor

@drzraf drzraf commented Mar 17, 2022

Fix #3561

If didn't further filtered children()->modular() because even if non-visible, the template could very well do page.parent.children.nonpublished.* and use its .content.

Although not perfect, it makes the computation a bit more "sane" than before.

$last_modified_date = gmdate('D, d M Y H:i:s', $this->modified()) . ' GMT';
$last_modified = $this->modified();
foreach ($this->children()->modular() as $cpage) {
$modular_mtime = (int)filemtime($cpage->filePath());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason you didn't use $cpage->lastModified() ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grav serving stalled content: Last-Modified ignore modular pages last modification date
2 participants