The last few weeks have seen an intense flurry of work on the Panels suite of modules. Today I've rolled releases of the Panels 3.7, CTools 1.7, Panels Everywhere 1.1 and a tiny bugfix release for Tinsel 1.1. This has created a massive chunk of new features that we're hoping will push Panels even more into the mainstream by seriously extending the power available to site builders, particularly in terms of giving site administrators better options for doing their jobs without having to worry about details they've taken care of.
First, I'd like to thank iO1 for sponsoring my time, and Chapter Three for sponsoring Sam's time for this work. This is just the the first round of a lot of great work that we have in mind, and we expect more great things to come out of this and after this.
Download links:
(And now, on with the excited babbling!)
In Place Editing
The first, obvious feature is the new In Place Editor that Sam Boyer begin_of_the_skype_highlighting end_of_the_skype_highlighting begin_of_the_skype_highlighting end_of_the_skype_highlighting worked on and showed off at at Drupalcon San Francisco. Put simply, In Place Editing means that when you create a panel page or a panel node, you can select an option which allows privileged users to edit the panel content without going to a back-end UI! These users can click on a "Customize this page" link and a simplified drag and drop UI will put itself into place, allowing users to add, edit and remove content. More advanced options such as styling and caching will still need to be handled via the back-end UI.
In the future, this will continue to be extended, allowing for the possibility of multiple in place editors that have more or fewer features, and finer control of exactly who can access this.
Stylizer
The last release of Panels had the stylizer, which to be honest was released before I was ready due to the need to get a security release out and having no easy way to release just a security fix. (I am hopeful that drupal.org processes will change to allow this with the git migration).
The stylizer is more or less color.module on steroids, but allowing you to set up colored styles for panes or panel regions. It uses the concept of a "base style", of which Panels currently ships with two (and really, really, desperately I want more, there should be a good half dozen). These let you control foreground and background color, font and border information. It can do CSS manipulation as well as image processing.
As part of this release, the entire UI was moved completely to CTools. While at the moment only Panels currently implements stylizer styles, the move means that non-Panels systems can make use of the stylizer back end for whatever nefarious purposes they desire. This means skinr hopefully can eventually use it, or someone could write a style manager for blocks that overries theme('block') and lets non-Panels websites style their blocks more freely.
One note: There are planned future changes to the style base system, so anyone who wants to run off and create new style bases should talk to me! For one, I'd really love to just ship with more, so there's no need to create them in a module right now, and for two...I have not yet documented how to build styles.
Improved flexible layout
I've made some very serious improvements to the flexible layout:
- The actual HTML weight has been reduced somewhat. It still produces inner and outer divs for every region, but it will not produce left/middle/right divs when not needed, and it will not produce column/row wrappers when there is only one column or row, since these are not needed.
- The "Canvas settings" now contains a number of interesting items:
- Canvas width -- can now be a fixed width.
- General class -- does not need to be tied to the display ID (which could change due to exporting).
- Column/region/row classes -- no longer needs to be panels-flexible-row but can be whatever you pick.
- Column/region/row separation -- control how much padding is between columns and regions.
- Disable the 100% -> 99% scaling for IE6. If you don't care about IE6 users this can be handy.
- Flexible layouts can now be saved for re-use, and managed in a separate interface. This means you can create the flexible layouts you need while developing panels and re-use them as necessary. Change the layout once and it changes everywhere.
Sadly, flexible still has issues in Garland because of a max-width on Garland's body class. The only fix, so far, is to increase that max width manually.
More things exportable
Amitaibu helped me develop a new generic Export UI framework, meaning that you can now create a fully functional list/edit/export/import/delete/clone user interface -- with searching, enabling and disabling -- in a relatively small amount of code. Doing so made it much easier to make more parts of the system exportable. I mentioned above that flexible layouts and stylizer styles can be exported, but you can also create and export custom rulesets and custom content. These are both very handy when you have complex rulesets or complex pieces of content you, as a site builder, wish to provide to a site (content) administrator without overwhelming them with all of the options Panels has.
Seriously improved views integration
We spent some time improving the Views integration. Panels should now support Views 3, which is nice.
But what's really cool is that there is now a "View context". What this means is that instead of simply putting a view in a single pane, you can load a view as a context. This is similar to loading a node as a context, where you can then display parts of the node in one region and parts in another. With a view context, you can display row #1 in the top region, and then rows 2, 4, 6, 8 in the left region and rows 3, 5, 7, 9 in the right region. You can put the pager in the bottom region, and put the header/footer where you think they should go as well.
But wait! There's more -- you can also control which fields get displayed. For example, in the above view, you could create two different 'body' fields in the view. One is trimmed to 2,000 characters, and the other is trimmed to 500. The first 3 rows could use the bigger body field, and the rest of the rows could use the smaller body field. You could do similar tricks using offset in the past, but this will run the view only once, reducing database load.
In addition, when creating view content panes (which I highly recommend as the only other way you should be getting your views into your panels), in the 'Allow settings' part of the display (in the Views UI) you can select that the pane config can control which fields to display, and you can also have it use the exposed form as pane configuration. If you do this, the exposed form will not actually be exposed to the user.
This is another feature that is targeted specifically at site builders wanting to give the right amount of flexibility to content administrators. You give them a set of fields they can choose from, and the right set of filters, and they can narrow it down when they add the widget to their panel.
Panels Everywhere
Panels Everywhere received one major boost in all of this. Panel pages can now directly select which Site Template to use. For those who haven't used Panels Everywhere, the general idea is that you use it to replace your block administration with a panel.
Traditionally, you have page.tpl.php with regions and use the clunky block UI to add blocks to regions, and then use block visibility rules to make blocks appear on a page.
With Panels Everywhere, you create a series of site templates -- these are layouts that contain all of the blocks, including a special "Page content" pane where the inner content of the page would be. You use selection rules to determine which site template to use. However, in complicated sites, the list of rules can get annoying. If you are using these templates to turn your site into sections, it can be convenient to simply say that a given panel page belongs to a given section and skip the rules entirely.
Under the hood -- changes that will interest developers
We made a lot of changes that are only of interest to developers, but I consider them exciting and wish to mention them here anyway.
Export UI
The new Export UI tool is a plugin with an OO based structure. You define the plugin which creates all of the normal menu items for you, and forwards all of these items to methods on the object. If you do nothing at all except create the plugin and tell it about your export.inc enabled schema, you will have a complete UI that can list, edit, export, delete, clone, enable and disable. Now, the edit won't do much because it does not know much about your object, so the first thing you'll need to do is create the edit form. The listing functions can be easily overridden.
When things get complicated, as they often do, the export.inc UI also supports the CTools multi-step wizard, meaning with only a little bit of effort you can use multi-step forms to edit your objects. The best thing I can suggest is to check out mini panels, which were retooled to use this UI. This saved about 400 lines of code in Mini Panels, plus added new features to the Mini Panels UI that only previously existed in the Page Manager UI.
This system is actually documented in the advanced help for CTools.
Plugins can have children
Content type plugins have always been able to have children, which is to say that one plugin can actually provide many. (For example, block.inc provides all of the blocks in your system, and view.inc provides all of the views in your system). However, the method it used to do that is clunky, and as the system has evolved it turned out to be easy to just add it to the core system. Now plugin types can declare that they support plugins having children, and then plugins that do only need to implement 'get child' and 'get children' callbacks. How to achieve this is documented in the advanced help, and looking at the custom access rulesets module is an excellent example on how a real plugin accomplishes this.
Super easy auto submitting forms
The Page Manager UI has always had this nifty auto-submit on the search bar, making it so you do not need to actually click the apply button to search. This got generalized into a tool. All that needs to be done is to ctools_include('auto-submit') and then apply the proper class to your form. CTools takes care of the rest.
export.inc got new magic so that exportables can use it.
In an effort to make sure export.inc integration is generally useful, we added a new piece of code that will let it get its keys and fields from joined tables. This effort was ultimately to allow exportables.module to integrate with it (and thus get the free integration with features.module this provides). This means that many core objects such as vocabularies and input filters will soon be freely exportable just like views.
export.inc got new magic for CRUD functions
Almost all exportables can be now interacted with via ctools_export_crud_* functions! Previously, developers adding export.inc integration to their objects needed to create their own library of CRUD functions. Now, however, all they need to do is utilize functions like ctools_export_crud_load('table', $key) and voila, their object will be loaded to their specifications. The 'export' section of the schema can provide callbacks, so even complicated multi-level nested objects can utilize these CRUD functions and reasonably expect to work.
CSS caching works with private filesystems
It is such a small thing, but it is worth mentioning that I did figure out how to get CSS caching to work with private filesystems. It has to go around drupal_add_css() so cached CSS on private filesystems cannot aggregate and may miss some other niceties, but it should now basically work.
AJAX Improvements
These actually went out mostly in CTools 1.6, and were another unfortunate consequence of the security release. The AJAX framework got an upgrade, allowing it to automatically transmit CSS and javascript files/settings during AJAX operations, dramatically opening up some of the possibilities during AJAX. Unfortunately, javascript aggregation (and some javascript extensions) were not completely compatible with this. And there may still be more issues with things like jquery updates but as near as I can tell, we've conquered most of them.
An appeal
I'd love it if some of the more enterprising users out there could make a 5 minute screencast (or two) of some of the new features. In particular, Stylizer, some of the new exportable stuff, and the new Views integration and the IPE will shine by being walked through quickly.

Comments
Amazing
This is amazing, I can't wait to try many of the new improvements. Thanks for the hard work.
unbelievable
I just looked for hours how to get 2 views working with one pager.
Almost give up and then stumbled over this post.
Your "View context" example describes excacly my use case!
And all other new features... impressive!
I just love the panels, views and ctools combo :-)
Thanks for the hard work!
D8 core! D8 core! D8
D8 core! D8 core! D8 core!
(eh, worth a shot)
> Context UI I think you
> Context UI
I think you meant export UI? :)
This release is no doubt super awesome!
What a release,
What a release, congrats!
What's the plan to bring all this goodness over to D7?
One, two, three many avenues of approach for a great July 26!
One of the happiest July 26 in a long time! What you are effectively doing is granting flexibility and sharing the power where it counts: small shops and individual developer consultants can be assured of being able to harvest honest honing head wrapping time and tools grabbing into a huge gain in site building productivity, re-use and re-processing and be in a position to pass that flexibility and real time customization over to their clients.
Plus the exportables shot in the arm for smallcore. Amazing breakthrough!
This is a big shot in the arm for plans I already have for a "panels everywhere" series of hands on investigative articles, plus a parallel holy grail search for a grid based base theme for panels everywhere, all of which looks likely to gain from the enhancements in the flexible layout.
Thanks so much for this exponential growth in your contributions to the Drupal CMS Framework and community!
Victor Kane
http://awebfactory.com.ar
http://projectflowandtracker.com
Incredible improvements
Wow...wasn't expecting those sorts of improvements. Front end editing, view context and more! Panels everywhere is quickly making itself the base of every site we build from now on.
Fantastic work. D8 core gets my vote
The holy cow rages on
Amazing work, Merlin and Sam.
I haven't even read through the post or tried the new features or panels everywhere.
Am seeing both context and Panels as proofs of concept, that are working towards solutions of the same area of problems.
It is a bit hard using them extensively on a site, like doing _everything_ in Panels. Especially because I believe the path to the future is unclear. But as a lot of people are using panels, one can hope for it to be continued at least to D8 or have a working upgrade path from Panels to core if core really makes the grade of including a mixed context/panels model with the best of both worlds.
But that being said, the rest is just awesome: that's exactly the kind of UI experimenting that we need to get to a higher level for core drupal. And it can - in this radical fashion - only happen in contrib. So looking forward to try this stuff out and write a glaringly appreciative blog posts if it delivers what it promises :)
Thanks for the great modules
I really like the edit in place when looking at a node wrapped in a panel. Just amazing.
You've Outdone Yourself Again...
I have to say Merlin, you have outdone yourself again. Not only do you put out some of the most useful modules in the Drupal repository, but you also make amazing improvements to those modules. This is a huge list of new features! I must install the updates immediately and try some of these out. Thanks to Sam as well, the inline editing feature is something I have been hoping to see for a long time in Drupal. I can't wait to tell some of my clients that I setup with Panels about this update. Keep up the amazing work!
Jason Moore
Arbor Web Development
Now that you are free...
Well, now that you have all this free time (*wink*), care to offer a quote or two about Views, for an article that I am writing for an online magazine. I like to use quotes, when possible. Article is targeted to newer users -- more about what Views can do for them. (Panels will make a great later article in the series.)
If so, please let me know, and I'll send you a few questions. My happy fingers are starting now.
Tyme
Skype: skype_tyme
PH: 202-470-4252
P.S. -- Sorry to hijack this post; seemed the only way to reach you.
Excellent release and very
Excellent release and very much appreciated!
Brilliant work
Very very nice. Please go on
Very very nice. Please go on with this amazing work.
Hats off to all involved!
Just amazing! I really like the new exportable stuff. That'll keep on getting more and more important for Drupal.
sweet
this is killer man.
praise merlin!
Screencast for In-Place Editor
Awesome work!
Here's a brief screencast showing the In-Place Editor: http://nodeone.se/blogg/panels-37-in-place-editor-quick-demo
Screencast for Panels + Views
Some technical errors for the previous screencast have now been seen to – one of these days I'll switch to archive.org instead of Vimeo.
I've also uploaded a quick screencast for the Views integration: http://vimeo.com/14066513
Cheers,
More screencasts...
I remade the Panels + Views screencasts, and they are now divided into two:
* Views Content Panes: What are they and what's new? http://nodeone.se/blogg/ctools-17-views-content-panes-quick-demo
* Views Context: What is it and how can you use it? http://nodeone.se/blogg/panels-37-views-context-quick-demo
I'll be posting any further updates to the Panels group on g.d.o: http://groups.drupal.org/panels.
Cheers,
I have been trying to use panels
I have been trying to use panels, have installed the modules panels6.x -3.7, Ctools 6.x-1.7
I can get to this point:
Basic settings » Choose layout » Panel settings » Panel content
Display settings
if i click on the cog to "add content" all I get is code see below and can not get any further. not sure where to go next? I basically can not get the add content page to work, all i get is code, any help will be much appreciated. I have reinstalled the modules but get the same outcome each time.
[ { "command": "settings", "argument": { "basePath": "/test/", "admin_menu": { "margin_top": 1 } } }, { "command": "css_files", "argument": [ { "file": "/test/modules/admin_menu/admin_menu.css?h", "media": "all" }, { "file": "/test/modules/ctools/css/ctools.css?h", "media": "all" }, { "file": "/test/modules/fckeditor/fckeditor.css?h", "media": "all" }, { "file": "/test/modules/node/node.css?h", "media": "all" }, { "file": "/test/modules/panels/css/panels.css?h", "media": "all" }, { "file": "/test/modules/system/defaults.css?h", "media": "all" }, { "file": "/test/modules/system/system.css?h", "media": "all" }, { "file": "/test/modules/system/system-menus.css?h", "media": "all" }, { "file": "/test/modules/user/user.css?h", "media": "all" }, { "file": "/test/modules/views/css/views.css?h", "media": "all" } ] }, { "command": "scripts", "argument": [ "/test/modules/jquery_update/replace/jquery.min.js?h", "/test/misc/drupal.js?h", "/test/modules/admin_menu/admin_menu.js?h", "/test/modules/panels/js/panels.js?h" ] }, { "command": "modal_display", "title": "Add content to Center", "output": "\x3cdiv class=\"panels-add-content-modal\"\x3e\x3cdiv class=\"panels-section-column panels-section-column-categories\"\x3e\x3cdiv class=\"inside\"\x3e\x3cdiv class=\"panels-categories-box\"\x3e\x3ca href=\"/test/?q=panels/ajax/editor/select-content/panel_context%3Apage-home%3Apage_home_panel_context/center/activity\" class=\"ctools-use-ajax panels-modal-add-category\" title=\"\"\x3eActivity\x3c/a\x3e\x3ca href=\"/test/?q=panels/ajax/editor/select-content/panel_context%3Apage-home%3Apage_home_panel_context/center/ctools-examples\" class=\"ctools-use-ajax panels-modal-add-category\" title=\"\"\x3eCTools Examples\x3c/a\x3e\x3ca href=\"/test/?q=panels/ajax/editor/select-content/panel_context%3Apage-home%3Apage_home_panel_context/center/menus\" class=\"ctools-use-ajax panels-modal-add-category\" title=\"\"\x3eMenus\x3c/a\x3e\x3ca href=\"/test/?q=panels/ajax/editor/select-content/panel_context%3Apage-home%3Apage_home_panel_context/center/page-elements\" class=\"ctools-use-ajax panels-modal-add-category\" title=\"\"\x3ePage elements\x3c/a\x3e\x3ca href=\"/test/?q=panels/ajax/editor/select-content/panel_context%3Apage-home%3Apage_home_panel_context/center/views\" class=\"ctools-use-ajax panels-modal-add-category\" title=\"\"\x3eViews\x3c/a\x3e\x3ca href=\"/test/?q=panels/ajax/editor/select-content/panel_context%3Apage-home%3Apage_home_panel_context/center/widgets\" class=\"ctools-use-ajax panels-modal-add-category\" title=\"\"\x3eWidgets\x3c/a\x3e\x3c/div\x3e\x3cdiv class=\"content-type-button clear-block\"\x3e\x3ca href=\"/test/?q=panels/ajax/editor/add-pane/panel_context%3Apage-home%3Apage_home_panel_context/center/node/node\" class=\"ctools-use-ajax panels-modal-add-config\" title=\"Add a node from your site as content.\"\x3e\x3cimg src=\"/test/modules/ctools/plugins/content_types/node/icon_node.png\" alt=\"\" title=\"\" width=\"16\" height=\"16\" /\x3e\x3c/a\x3e\x3cdiv\x3e\x3ca href=\"/test/?q=panels/ajax/editor/add-pane/panel_context%3Apage-home%3Apage_home_panel_context/center/node/node\" class=\"ctools-use-ajax panels-modal-add-config\" title=\"Add a node from your site as content.\"\x3eExisting node\x3c/a\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class=\"content-type-button clear-block\"\x3e\x3ca href=\"/test/?q=panels/ajax/editor/add-pane/panel_context%3Apage-home%3Apage_home_panel_context/center/custom/custom\" class=\"ctools-use-ajax panels-modal-add-config\" title=\"Create a completely custom piece of HTML content.\"\x3e\x3cimg src=\"/test/modules/ctools/images/no-icon.png\" alt=\"\" title=\"\" width=\"16\" height=\"16\" /\x3e\x3c/a\x3e\x3cdiv\x3e\x3ca href=\"/test/?q=panels/ajax/editor/add-pane/panel_context%3Apage-home%3Apage_home_panel_context/center/custom/custom\" class=\"ctools-use-ajax panels-modal-add-config\" title=\"Create a completely custom piece of HTML content.\"\x3eNew custom content\x3c/a\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class=\"panels-categories-description\"\x3eContent options are divided by category. Please select a category from the left to proceed.\x3c/div\x3e\x3c/div\x3e" } ]
I'm not sure
I'm not sure that this is the right forum for support, but I'll make an attempt to answer the question anyway. :-)
(A better place for questions is probably http://groups.drupal.org/panels .)
1. What platform are you using? It seems strange that you get the code output, and that you get it over and over again. I've gotten some error messages when activating the modules, and sometimes when I'm a bit too eager to click buttons in the Panels interface, but nothing that persist if I reload the page. This makes me suspect that something on your server configuration is causing the problems.
2. I've also noticed one or two problems that went away after flushing the cache. Have you tried flushing?
Cheers!
Thanks for that I have also
Thanks for that
I have also posted on drupal - Can't add any content to any panel region - http://drupal.org/node/873010
But still have no answer as yet.
I have tried flushing the cache, and it makes no difference. I am using Drupal 6 set up on a mac os X, also on a linux server and have tried this on a PC and get the same result.
Thanks for trying to help, much appreciated.
Awesome!
I've finally gotten around to upgrading Panels and CTools - absolutely love what you've done with the reusability of styles and layouts, and the Stylizer is freakin' awesome! Here I am, plodding through my module updates and find out that I now have all of these new tools to play with! You've made my day.
Really Awesome
Congratulation and thanks for a fantastic job.
Any ideas for what will happen in Drupal 7?
Base Styles
Great stuff! Would love some more base styles or at least an easy way (docs?) on how to create them. BTW preview didn't seem to work for me in chrome.
Long over due
These improvements were LOOOONNNG over due. I am not wait to try them. Thank you for sharing.
Add new comment