![]() ![]() What this means is that even if Book Review’s original content type was very basic, Panels and Page Manager let us add more content to the layout we’re creating. This brings up a pop-up menu of relevant content we can add to the Left side column. To start adding content to the Left side, we click on its cog wheel to select Add content. Note that there are two ‘columns’, Left side and Right side, with a cog wheel on the top left of each. The next and most fun part of Panels is where we get to (finally) define the content we want to add and arrange. However, since we want to demonstrate Panels, we are selecting this option. Renderer: the In-Place Editor allows further changes once the layout goes live, which is not always a good thing.However, since we do want to keep the overall look of Book Reviews consistent with the rest of the website, we want to keep the sidebar and we won’t select this. If you select this, Drupal won’t render any blocks or regions originally assigned to this page, such as sidebars. Disable Drupal blocks/regions: means just that.One is relevant to the design and one adds editing flexibility. In the next set of configuration choices, there are two options of note. In this case, we choose category Columns:2, which brings up options for 2-column layouts. Then Continue to move on to choosing the layout. There is only one criteria, so ‘All criteria must pass’ is fine. Save to return to the Configure Selection Rules menu. When we press Add, we can select node type (content type) Book Review from the pop-up menu. To configure selection criteria, we select Node: type from the drop-down menu of available criteria, because we want to change the display of a content type. The Configure page will ask us about selection rules, layout, panel settings, and panel content. Now that we’ve created the variant BookReviewTwo (for a 2-column layout), it’s time to configure it. Optional features: the important one is Selection rules this is what provides us with more control over the page display.Title: for administrative use only, so provide a descriptive title that helps you remember what it’s for.Think of variant as ‘version of how this content gets displayed’. First we need to enable Node Template, then Edit.įrom the Node template menu, we want to Add a new variant, which then brings up the Add variant page. We want to work with Node Template, which defines how Drupal controls the display for existing nodes (pieces of content). The titles in black shows all the pages enabled and being managed by Page Manager. The Panels module works in conjunction with Page Manager, so we begin at Administration / Structure / Pages. (related article: Drupal 8 Arrives: Top New Features) Using Panels, we will create a different look for this content type: a two-column layout (below, right) that puts the text of the review in one column and the rest of the content (image, genre, author, publisher) in another column. The layout defined by Danland provides a single column of main content, which contains all those fields (below, left). This content type allows content editors to enter a review, upload a cover image, and enter author name, publisher name, and genre. ![]() We’re going to apply Panels to a custom content type we built previously, called Book Review. Our demo site uses Drupal 7 and the Danland theme. How to change the look of an existing content type Once you do this, you’ll see Panels appear under the Structure menu. Chaos Tool Suite: Chaos Tools (CTools), Page manager.If you don’t have cTools, you will need to install it. The first thing to do is to install the Panels module from Drupal. There are plenty of other use cases for Panels, they're just not within the scope of a single blog. This tutorial walks through an example using Panels to change the look of an existing content type. If your theme doesn’t support the layout and regions you need, however, the Panels module gives you the option to create customized displays for content. In our last Drupal blog, we demonstrated how to use blocks in Drupal 7 when you want to show content in a different region or add a new ‘block’ of content to your existing layout. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |