Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Dashboard and panels are kinda similar, but not really. The content API in Panels is moving to chaostools. This is the shared functionality, dashboard should use it.
Comment | File | Size | Author |
---|---|---|---|
#5 | 4331334-add-ctools.patch | 2.43 KB | agentrickard |
#4 | dashboard-add-ctools.patch | 2.25 KB | agentrickard |
#3 | Picture 1.png | 80.64 KB | agentrickard |
#3 | Picture 2.png | 23.54 KB | agentrickard |
Comments
Comment #1
drummTag
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedStatus: API itself is now in chaostools and seems stable. I have add/edit/config working with it in an unchecked in Panels 3. Currently the 'custom' content type (type in a title and a body) works and the 'block' content type works, where Drupal blocks can be made available.
Remaining needs: We'll need Views content widgets and we'll need the UI to control widget availability for dashboard, because it will very much want to limit what is available and this is going to be much better if it can be controlled through a UI I think. Though it may be that a hook would be better since that way it's drupalorg. If it's the latter, dashboard can handle it and I need do nothing.
Comment #3
agentrickardMy thought is to have admin configuration for dashboard handle the availability issue. Something cleaner than (but similar to) the old MySite configuration options (attached).
There would also be configuration options per content class, such as the options for selecting which Vocabularies to display term-based data for (attached).
This is made possible through hook_dashboard and admin page callbacks.
Comment #4
agentrickardHere is a patch to integrate CTools into the dashboard loader functions. It also removes the simple code from hook_init().
Let access checks tell us if we need to load the package.
Comment #5
agentrickardPatch missed part. Now updated to HEAD.
Comment #6
merlinofchaos CreditAttribution: merlinofchaos commentedThe second function here doesn't really do anything except load code unnecessarily, unless you intended to return values, which it doesn't look like you do. Just
ctools_include('content')
should be fine. You should use ctools_get_content_type($item) whenever you need that in order to load the code for it only on demand, and usectools_content_get_available_types()
(note: currently this is ctools_get_available_content_types() in CVS but am committing a change shortly because the function name is inconsistent with the normal namespace rules I'm using) to get a complete list of available content (including subtypes) that can be used.Comment #7
agentrickardCorrected and committed to HEAD.
Comment #8
drummComment #9
drummLooks like the next steps are:
- Change database to store Ctools content identifiers
- Convert dashboard.defaults.inc to identify Ctools content
- Convert dashboard_page() to render Ctools content
Comment #10
drummI did all that. I guess this is fixed.