Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Panels

Panels Although it's not as popular as Views, the Panels module has a reported usage of more than 100,000 installs! Not too shabby. If you haven't tried Panels yet, it's a little hard to wrap your head around it at first when you are used to Drupal's built-in block configuration. But, if you are willing to take the plunge, you'll find that Panels is an awesome tool for sites with non-standard or multiple layout requirements. David Mercer's Drupal 7 book has an introduction to Panels, but, for more in-depth coverage, Bhavin (Vin) Patel has a Drupal Panels book and Earl and Lynette Miles wrote one for Panels, CCK, and Views. I'll assume you know how to use Panels for this section. Panel panes The language behavior of panel panes depends on the pane content. For example, if you add a multilingual block, then you will see the language-specific block content when viewing the panel with another language. This is the same for any component added to a pane including nodes, menus, variables, and forms. In my case, I created a panel page that included the Powered by Drupal block, Who's online block, site name, "Multilingual Drupal rocks" blog post, the contact form, and a custom footer menu. When viewing the panel page in German, all of these components are translated accordingly. Awesome! At the time of writing, one issue with multilingual panel panes is how to deal with titles. You can override a pane title if you want to, but then how do you translate that title? Well, fortunately, people have been working on that problem and there is a patch that works. Follow the issue at drupal.org/node/1179034. I applied the patch, saved the panel page again, and flushed the caches. Now there is a new Panels text group available on the Configuration | Regional and language | Translate interface | Translate page.Just choose this text group and click Filter and you'll see all the Panels-related strings you can translate. Language-specific panel pages If you want different panel pages per language, there is currently no way to set the language of the panel page. But, you can create a translation set for your panel pages by using the Path Translation module as follows: Create separate panel pages per language with unique paths.Install the Path Translation module from the Internationalization package (drupal.org/project/i18n).Go to Configuration | Regional and language | Translation sets | Paths.Click on the Add path translation link.Fill in paths for each language and click the Save button. Now the language switcher will know what links to use for each language. Tip The Path Translation module is not specific to Panels. You can use it for Views pages or custom pages created with a module. It is not needed for node content.

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint