I'm not sure if this is a support request or perhaps a feature request or maybe I'm trying to stretch DS beyond what it's intended to do.
I'd like to use DS to put different reusable content in a region of a node based on the individual node.
I have a node where a region displays a dynamic field to display a ctools custom content pane. That works nicely but I'd like another node of the same content type and view mode to display a different custom content pane in the same region. Is there a "nice" way of doing that in DS? I guess it could be done with multiple view modes and using the view mode per node feature but that doesn't feel like a good solution.
The method I used on another site was using blocks and I wrote a simple module that displays a "master block" but the code within hook_block_view figured out which block we really wanted to show based on the current node, render that block and return the content. I'm probably going to do the same again unless I'm missing something and there is a better way. This time I'll probably use custom content panes rather than blocks.
For ad-hoc one-off content in a region, the content type has a field which DS displays in that region.
FWIW, I spent a day or two playing with Panelizer. That's one solution to this but ... I just somehow prefer DS :) I know the two modules do different things and Earl / merlinofchaos said that it's like comparing apples and bullets but they can be used to produce a similar end result.
Thanks
Comments
Comment #1
aspilicious commentedSrry for the extremely late answer. Seams you already discovered some possibilities. :)
No there is no "easy" solution.
The only thing you can do is create a custom ds_field with hook_ds_field_info where you can control your own logic in code.
I think you know the answer by now, so I'm going to close this :)