Based on a chat with Earl, I'm working on a new view row style plugin that will render the panelizer panels display for a view of panelizer nodes. Stay tuned for a patch...

Comments

dww’s picture

Status: Active » Needs review
StatusFileSize
new7.27 KB

This 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.

awebb’s picture

You now have permissions. Thanks for your interest in the project and help!

dww’s picture

The 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

dww’s picture

Status: Needs review » Postponed

This 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.

dww’s picture

Status: Postponed » Needs work

#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.

dww’s picture

StatusFileSize
new8.52 KB

This 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. ;)

dww’s picture

Status: Needs work » Needs review
StatusFileSize
new9.26 KB

Yay -- 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?

dww’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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