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).
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2022541-panelizer-node-page-unpublished-1.patch | 885 bytes | hefox |
Comments
Comment #1
hefox commentedTo 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
Comment #2
merlinofchaos commentedCan 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.
Comment #3
hefox commentedI'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.
Comment #4
merlinofchaos commentedWell, 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.
Comment #5
damienmckennaShould it work on each individual pane instead of the whole panel? That said, to match core it really should be added to the page.
Comment #6
merlinofchaos commentedMoving 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.
Comment #7
mpotter commentedI 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.
Comment #8
damienmckennaShort & simple, and now committed! Thanks hefox!