Since not going through node_view (at least not in the usual route), the unpublished class is not added. Neither are page views going through theme panelizer_view_mode, which does add the class (or at least has the some code to add them).

Comments

hefox’s picture

Status: Active » Needs work
StatusFileSize
new885 bytes

To get some sort of patch, here's one that ends up adding the classes to the body, which results in pinking out the entire page, but better than nothing? XD!

My idea is that unpublished nodes would mostly match core for visual indication of unpublished

merlinofchaos’s picture

Can we actually do better than pinking the entire page? We don't really know what's inside the Panel, so we can't generically target anything.

hefox’s picture

I'm hopeful that someone has a better idea, because yea, pinking the entire screen is quite ugly.

One idea I had was provide a region style that adds the classes, but that'd prevent using other region styles.

merlinofchaos’s picture

Well, CSS cascades, so you can fix your CSS to only pink the right region. There's no way to automate that, I don't think.

damienmckenna’s picture

Should it work on each individual pane instead of the whole panel? That said, to match core it really should be added to the page.

merlinofchaos’s picture

Status: Needs work » Needs review

Moving to NR to make sure this gets seriously considered. I'll wait and see if anyone has better alternatives, but otherwise I think this should go in.

mpotter’s picture

Status: Needs review » Reviewed & tested by the community

I can't think of a better way to do it, and I can certainly handle the css so the entire page isn't pink. I think this could go in.

damienmckenna’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Short & simple, and now committed! Thanks hefox!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.