Activity Creating the contactus Attachment view

We'll save the content, which is shown in the following screenshot. 5. We'll save the content, which is shown in the following screenshot. 6. With our content created, we're ready to create our Attachment display. Edit our Contact us view 6. With our content created, we're ready to create our Attachment display. Edit our Contact us view 7. Create a title for the view, and name it Guild Builders Contact Information, also create the header information, to appear beneath the title. 8. The next...

Ti

The core entry specifies which major version of Drupal the module is meant to work with, such as 5.x, 6.x, or 7.x. 6. Finally, this line specifies the version of our module. It's meant to work with Drupal 6.x and is the first version of our module, and since we will not be releasing a pre-release version (0.x), we'll make it version 1.0. 7. Our file now looks as follows 8. We need to create a directory in which our module will live. We already have the path sites all modules in which add-on...

Activity Creating the Management Page display

One of the benefits of Views is that we can tailor information for multiple audiences. We can have a Page display targeted at users, and another, such as the one we're about to create, for the site owners. Defaults Subz Page Attachment Block 2. Give this Page display a name as we did the other, to differentiate the two. 3. Next, give the display a title to show when viewed, after clicking Override, so that it only affects this display. Status using default values. Override This title will be...

Activity Creating the Bio view

Start by creating a new view of type Node, and naming it bio. Node revision Term User Access log Next 2. Having created the view, we will see its panel. At this point, we haven't created a display, and are looking at the default settings. As a reminder, anything we set here will apply to each display in the view unless we override the setting. 3. We'll make a couple of settings changes here, because the settings will be used by more displays than not, and we won't have to edit these settings...

What is an Attachment view

That, in a nutshell, describes views at their simplest. Now, how about Attachment views Well, to continue using the same example, let's say that our requirement has changed, and we don't always want a page based on every node having to do with travel, but want to be able to select destinations from a list of regions shown on the same page, as illustrated in the following figure. North America Pasific Island South America The box on the left shows the available travel regions, each of which is a...

Content profile

Location This module builds user profiles as content also known as nodes , which opens the opportunity to use all the powerful modules for content for user profiles too, for example, the Content Construction Kit CCK . It's intended to be simple and useful, but extensible by further modules. The setting for Content Profile is an extra pane in the content type settings. If checked, that content type is used as the user profile. If unchecked, as shown next, that particular content type will not be...

AddOn Modules

We have made use of many contributed modules in our site. This Appendix contains information about each, and screenshots of the configuration settings where applicable. A few modules were used in the site, but not in the book. Such modules are included in this Appendix. Drupal 7 will have a module installer, much like the one found in Joomla . However, in Drupal 6, you must do the following Download the compressed file from the module page Drop the module folder into the sites all modules...

Activity Subcontractor Attachment view

Let us begin by creating the Attachment display for our current view. 3. Move on to the Arguments pane. We want to be able to supply this display with an argument, so that it will show us a specific subcontractor profile. Click on the icon, and scroll down through the field list to add Node Title. Remember, we're using the content_profile module, so each subcontractor profile will be a node. 4. Adding the argument brings up a subsequent dialog. We want the title of the view to show as the...

Activity Creating the Job Attachment display

The final display in our view is the one that will display the detail of the job. The content type was designed to be dual-use, holding the information necessary for a job in the bidding stage, as well as a completed job being shown as reference work. The display will show the fields. 1. Name this display Job Attachment. 2. We'll be showing only one node at a time with this attachment, so change the Items to display setting to 1, making sure to override the default. 3. In the Position setting...

[packt

Learn how ta mammae and optimize your Drupai tramewwk usmg Dm pal 6 best practioo pflrformanca wftjtwn and Learn how to maximize and optimize your Drupal framework using Drupal 6 best practice performance solutions and tools 1. Monitor the performance of your Drupal website and improve it 2. Configure a Drupal multisite environment for best performance 3. Lot of examples with clear explanations ISBN 978-1-847196-40-8 Paperback 352 pages Build powerful website features for your business and...

Activity Creating a News block

We're going to create a Block display in our jobs view that will show the newest job open for bidding. The block will be assigned to our new region, and only be visible to Authenticated users subcontractors . 1. Edit the existing jobs view, and create a Block display. h' lt x I t 2. Name the display Latest Job Block. This title will appear only in the administrative interface for the View. This title will appear only in the administrative interface for the View. 3. Also make the Block title the...

Drupal Attachment Views

Use multiple-display views to add functionality and value to your site All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this...

Activity Creating the Attachment displays

We'll be creating an Attachment display for each of the content types in use on the site. Each display will be precisely the same as the next, other than the Node type and Display name. We'll create the first one step-by-step, and then simply note the additional displays that are created in the same way. 1. The first step will be the creation of the display. 2. We'll name this first one Bio Attachment. 3. Change the Inherit arguments setting, since the display will list all the nodes of the Bio...

Menu per role

Location This module allows you to restrict access to menu items per roles. It depends on the Drupal core menu.module just activate both modules and edit a menu item as usual. There will be a new fieldset that allows you to restrict access by role. There is no settings page for this module. When it is active, a new panel will appear, as in the following image, when editing menu entries. Last check check to know whether the user has proper permission to see the Restrict access to oniy these...

Activity Creating the priorwork Attachment display

We're going to handle the creation of the Prior-Work Attachment display in the same way as we did the Page display earlier, by showing the panel of the completed display along with a bulleted list of how it differs from the Bio Attachment display. Unformatted Row style Fields Use AJAX No Items to display 1C Distinct No Access Unrestricted Caching None Link display Bio Page Exposed form in block No Header None Footer None Fields -fclfrl Node Nid Node Title Node Tvpe Job Content Display Display...

Activity Creating the Page

Let's turn our attention now to the first visible part of our view. We're going to arrange things differently than in the last chapter. The part of the view that users will consider to be the main content will be done as an attachment view. So, that accounts for the larger display of the three on the page. With two smaller displays still to do a list of jobs and a list of employees which will be the Page display It really doesn't matter, so let's make the Page display the one most connected to...

Activity Adding a Theme region

We're going to be creating a view in the next activity to display a news item on our front page. The location for that view needs to be in a location that is currently not addressable in our theme. What to do, what to do Simple. We'll create a new region in our theme, and add it to our template. 1. We need to edit our theme info file. In this case, the theme is Acquia Slate. First, let's look at the handy view the block page gives us of our regions. Focus on the upper ones. 2. Open...

Activity Creating the Subs Attachment display

We'll do the prudent thing first, and save our view. Why Because I accidentally clicked on Close all Tabs in my browser's context menu, and there went the view, prior to my saving it. Don't let this happen to you 1. Now that I have somewhat patiently recreated our view, we can move on to creating an Attachment display. 2. Since we're only going to have one Attachment display, we can leave the name as it is. Add a title, and click Override so that it only gets applied to this display. Projects...

ImageAPI

Location http drupal.org project imageapi This API is required by the ImageCache module. This API is required by the ImageCache module. The ImageAPI GD2 module is the only enabled image toolkit. Drupal will use it for resizing, cropping and other image manipulations. Set the quality setting for the image, or leave the setting at the default. Set the permissions for administering the module. In our case, only User 1 will be able to administer it, so none of the roles need to receive the...

Activity Creating the Subs Page display

The Page display in our Job view will be available only to authenticated users, and in particular, will be used by subcontractors to view upcoming projects on which they can bid. 1. A warning will be lurking just below the work area as we change each setting, which lets us know that we have not yet selected any fields. Ignore it. At the appropriate time, the necessary settings to appease it will be made. Create a new Node view, as shown in the following screenshot. This 5 the unique name of the...

Views

Enter Earl Miles, also known as merlinofchaos within the Drupal community. There is a 'trinity' of modules available for Drupal that offer an amazing leap in functionality he wrote two of them , and Views is one of those modules. A view is originally a relational database term, referring to a temporary arrangement of information in the database so that it can be presented in a meaningful way which is different than the underlying table layout. The Views module accomplishes the same thing, and...

Activity Creating the other Attachment displays

We're going to repeat the steps in Activity 8-3 for each of our content types About-Us Info, Job, Location and Subcontractor, naming them appropriately and selecting the matching node type for the filter. The previews for each are as follows Separate arguments l'jith a as though they were a URL path. Separate arguments with a I as though they were a URL path Location Attachment Preview Separate arguments with a I as though they were a URL path

Activity Subcontractor page view

The Subcontractor page will allow the user to view the details of a subcontractor chosen from a dynamic list. That is, the list of subcontractors will not be something separate that requires editing whenever a subcontractor is added or removed, and the list will be in the content area of the page and not in a navigational menu. 1. Let's create a new view. We're going to create a node view named subs, as shown in the following screenshot 3. We'll click on Title and change the view title, as...

Bios

In this chapter, we will develop a 3-view composite display, using two custom content types. This view will be used to show biographies of the company's employees. To provide the visualization of the employee bios, you will build a view containing the following An Attachment display from which to select a bio A Page display that shows the selected bio A second Attachment display to show the recent job s You will then create templates for formatting the view displays.

Activity Creating a peekaboo login box

So, what is a 'peekaboo' login box There are many names for it, such as collapsing, expanding, and so on. In Drupal parlance, it is a block that shows only its title until clicked, and once clicked, opens to expose its contents, much like a collapsible pane in a form. Why would you want one One of the more common complaints that I hear is that the login form consumes too much real estate in the sidebar. There are other ways of dealing with this Theme the login box to make it smaller Replace the...

Input formats

Input formats come into play wherever there is a text box used for entering content. The default format is Filtered HTML, which unaltered, offers a set of tags too limited for our needs. We have the options of editing the input format to bring it in line with what we need, add a new format, or specify Full HTML, which allows all HTML tags, and that's what we'll select, since there will be only one trusted person creating content. Input formats Acfd input format Input formats define a way of...