dropplets icon indicating copy to clipboard operation
dropplets copied to clipboard

Draft vs Published

Open tspauld98 opened this issue 13 years ago • 1 comments

I just upgraded to the latest version of dropplets and noticed that the behavior of an article marked as "draft" changed. It used to be that the "draft" article would not show up in the main page article list but that it would render if you knew the direct URL of the article. This feature made "draft" articles equivalent to hidden articles that were still accessible. I found this feature useful especially when having a friend review an article for me.

Now the behavior of a "draft" article is that it will not be displayed at all even if you know the direct URL. Is this change intentional? If so, what's the reason for making the change? I can change it back in my fork, but I don't want to go against the design of the core dropplets framework. Any guidance with this feature would be appreciated.

Thanks.

tspauld98 avatar Aug 20 '13 17:08 tspauld98

Here's the relevant commit. The reason for the behavior was probably to prevent draft posts from accidentally being viewable by changing the site CSS.

An easy (ish) way to fix this is to:

  • change the draft post status in your draft files to review
  • edit your theme's post.php to add <?php echo($post_status); ?> as a class attribute on the post's topmost element, like is done with the Simple theme in this commit
  • style .review in your theme CSS with display: none;
  • you're back to having the same effect as before.

benlk avatar Aug 20 '13 18:08 benlk