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

Handling of unpublished blog posts in Archive.cshtml #47

Open
axunonb opened this issue May 27, 2022 · 0 comments
Open

Handling of unpublished blog posts in Archive.cshtml #47

axunonb opened this issue May 27, 2022 · 0 comments

Comments

@axunonb
Copy link

axunonb commented May 27, 2022

Stumbled across the following lines, which I found misleading:
https://github.com/PiranhaCMS/piranha.core/blob/2cf3647caf7a0fdc4bd248051554fc4b6fe570f2/examples/RazorWeb/Pages/Archive.cshtml#L73-L78

Because to my understanding, the model
https://github.com/PiranhaCMS/piranha.core/blob/2cf3647caf7a0fdc4bd248051554fc4b6fe570f2/examples/RazorWeb/Pages/Archive.cshtml#L2
does not include posts with PostInfo.Published == false. (And if it would, the post shouldn't be shown at all?)

To resume: Isn't the if statement above redundant, and to be removed for more clarity?

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

No branches or pull requests

1 participant