200 likes | 382 Views
Drupal Blocks. David Manela, Mark Ritzman , Chad Campbell. Overview:. What are blocks? Why do we need them? How do we use blocks? How does Drupal store block information in its database? Panels. What are Blocks?.
E N D
Drupal Blocks David Manela, Mark Ritzman, Chad Campbell
Overview: • What are blocks? • Why do we need them? • How do we use blocks? • How does Drupal store block information in its database? • Panels
What are Blocks? • Blocks are a method for positioning data within a page. They often contain lists of nodes or other navigational content and are frequently placed in the left or right regions of a page. • You can specify that a block only appears on certain pages or in certain contexts. • Assignment to a region is specified through the admin settings. • Blocks themselves are not nodes. http://drupal.org/getting-started/before/terminology#b
Who cares? • Blocks are good for displaying content that you want on multiple pages. For example you might want to have a login block on every page if the user isn’t logged in. Or another example is maybe you want to have a comments block on every page except the front page. Blocks save you time and effort. Blocks give you flexibility. http://webpodge.com/2007/02/21/drupal-tutorial-part-3-blocks-and-regions/
What was that Region thing you mentioned? • Regions are important only because they allow you to place blocks in them. Think of a region as a block of space on a webpage. In that space you can have multiple blocks. However because blocks are so flexible you can have multiple blocks occupy that region on different pages. An example would be to have a login block on the front page in your left region and on the userpage having a user comments block occupy that left side region. http://webpodge.com/2007/02/21/drupal-tutorial-part-3-blocks-and-regions/
Blocks • Module – what the block is used for: menu, user login, comments, etc. • Delta – unique identifier for a block • Theme – style of the block • Status – shows if the block is published • Weight – determines the order of the blocks in region • Region – determines which region of the webpage the block is placed in
Blocks Continued • Custom – custom visibility settings: controls whether users can choose to show and or hide the block • Throttle – congestion control. Allows administrator to decide what to do if there is heavy site traffic • Visibility – determines who can see a particular block based on user, role, and page • Pages – determines which pages use the block • Title – overrides the default title of a block • Cache – if enabled, allows blocks to be loaded from the cache rather than from the page which can decrease loading times
Panels • Panels is a module for drupal that takes the concept of blocks and adds more flexibility. • Allows customized layouts for multiple users. • At its core it uses a drag and drop content manager letting you visually design a layout and place content within that layout. • Integration with other systems allows you to create nodes that use it, landing pages that use it, and even override system pages such as taxonomy and the node page so that you can customize the layout of your site with very fine grained permissions. • Panels integrates with Views to allow administrators to add any view as content. Or, for uses where the layout editor needs more tightly controlled content, Views can be given custom displays to provide only what the site administrator wants the panels builder to use. http://drupal.org/project/panels
Panels screenshot http://drupal.org/project/panels