Closed (works as designed)
Project:
RESTful Panels
Version:
7.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Apr 2016 at 18:37 UTC
Updated:
28 Apr 2016 at 14:36 UTC
Jump to comment: Most recent
Comments
Comment #2
hussainwebI'm sorry for the late response here.
If you have built the pane, then there is a much easier way to do this. Otherwise, there is no straight-forward way to do this.
For plugins/panes you control, you can check for a
'restful_panels'context in the render callback. For example, this is a'render callback'for my ctools content type plugin:The
example_pane_json_renderjust returns astdClassobject. This structure is sent back as is from the RESTful endpoint. Theexample_pane_admin_infogenerates HTML and is not really relevant in a RESTful call. It is only called if the panel is "viewed" normally.For other types of panels, there are two ways I can think of:
Do you have any other ideas?
Comment #3
colinmccabe commentedThanks for the advice! I agree, the general approach seems to be to write custom CTools content types. I was hoping for a silver bullet, but it doesn't look like there is one. Drupal wants to render everything itself, and to go against that requires custom code.
Comment #4
colinmccabe commented