Closed (fixed)
Project:
Panelizer (obsolete)
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
27 May 2011 at 00:05 UTC
Updated:
14 Jul 2011 at 20:02 UTC
Jump to comment: Most recent file
Comments
Comment #1
dwwThis appears to be working fine after limited testing. I'd be happy to push this directly into panelizer's 6.x-1.x branch if Earl wanted to grant me push perms. ;) Or, a "git am" on the patch should preserve authorship so git blame will point to me.
Comment #2
awebb commentedYou now have permissions. Thanks for your interest in the project and help!
Comment #3
dwwThe other approach instead of patch #1 would be to use hook_views_data_alter() to swap out the handler for the standard 'node' row style to use panelizer_node. That would use the 'node' row style plugin as a parent, but just add a new build mode option of 'panelizer' or something. A lot of the patch would be the same, but the end result UI would be different. So, is it better to have this choice visible as a totally different kind of row style, or as an option to the existing node row style? I certainly expected to find it as an option under 'node' rows (I expected it to work using full node build mode). I'd be happy to try to re-roll this as a magic build mode instead of a different row style, but I'm not sure that's better. The separate row style plugin has the advantage of a working patch instead of being vaporware. ;) It also might be more visible this way, and it might be more resilient in exported views when they're imported onto sites without panelizer enabled... (e.g. you see an obvious "missing plugin" warning, instead of a build mode that silently doesn't give you any output.
Thoughts?
Thanks,
-Derek
Comment #4
dwwThis shouldn't happen until #1175890: Implement hook_node_view() to render panelizer panels display without page manager is resolved, since that would render this obsolete.
Comment #5
dww#1175890: Implement hook_node_view() to render panelizer panels display without page manager ended up being won't fix'ed, so this is active again.
However, based on a quick chat with Earl, although he's in favor of keeping this as a totally separate row style, he'd prefer it falls back to a regular node_view() if it's not a panelized node, so that it works for any kind of content.
Comment #6
dwwThis isn't quite working yet, since I can't seem to get render() to do the right thing on the non-panelizer nodes. I tried calling parent::render() in there, too, but that didn't work, either. Hrmph. But, I'm posting this in the hopes that Earl and I can figure out what I'm doing wrong. ;)
Comment #7
dwwYay -- Earl helped me get this working again by uncovering #1205376: Need a way to prevent Views from registering themes on inherited styles. ;)
So, here's a hopefully final patch. This also includes some code and UI cleanup based on my chat with Earl.
Any final objections?
Comment #8
dwwPorted to D7 and tested. Then committed and pushed to both branches:
http://drupal.org/commitlog/commit/18014/b8a556d8131dd935a2e0b2184df6061...
http://drupal.org/commitlog/commit/18014/77abedbeee0cb61220f1a163df7b6e5...