drupal cms support - expanding beyond the basic · with basic pages, you learned about the standard...

21
Expanding beyond the Basic Learning about the more “dynamic” content types Overview & Purpose To learn the unique characteristics of each of the available “content types”, and how and why to use them. Objectives 1. To be able to create Blog, Event, News, and People content, and understand why they automatically appear where they do. 2. To understand what the course importer does, and why, and how to set one up. 3. To be able to create Webform content. The Back-story While Basic Pages are useful for all the “anchor” pages in your site (static, they define your basic site structure), we have other content types available that offer additional functionality, without an equivalent addition to the level of effort one must exert. 1. Anyone who has in the past manually coded HTML pages in various directories will appreciate how Drupal sites can display lists of these dynamic types of content in multiple places that are automatically updated as you add new content. 2. Our platform relies on the Registrar’s office as the “canonical” source of Course information here at the University; as such, you will not have to manually create course content for your site. 1

Upload: others

Post on 20-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

Expanding beyond the Basic 

Learning about the more “dynamic” content types 

Overview & Purpose 

To learn the unique characteristics of each of the available “content types”, and how and why to use them.  

Objectives 

1. To be able to create Blog, Event, News, and People content, and understand why they automatically appear where they do. 

2. To understand what the course importer does, and why, and how to set one up. 3. To be able to create Webform content. 

The Back-story 

While Basic Pages are useful for all the “anchor” pages in your site (static, they define your basic site structure), we have other content types available that offer additional functionality, without an equivalent addition to the level of effort one must exert. 

1. Anyone who has in the past manually coded HTML pages in various directories will appreciate how Drupal sites can display lists of these dynamic types of content in multiple places that are automatically updated as you add new content. 

2. Our platform relies on the Registrar’s office as the “canonical” source of Course information here at the University; as such, you will not have to manually create course content for your site. 

1  

Page 2: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

3. While not as powerful as a dedicated web-based form creation service, you can still do some nifty things using Webform content, and the only thing you’ll have to spend is your time. 

The Nitty Gritty 

This is where we delve into the details of this class’ subject matter. The main thing to consider here is that if you can create Basic Pages, you can create pages of all of the other content types, as they do not differ greatly from each other. The premise is the same: fill out a form, save it, publish it when you’re done, lather, rinse, repeat. The bonus you get with these other, “dynamic” content types? They will automatically start appearing in different sections of your website, listed by date or by title, all you have to do is keep adding them! 

Blog and News content 

I’m grouping these two content types together as they are about as equal to each other as two content types could possibly be. They also are probably the content types least dissimilar to Basic Pages. What does this mean? This means you will find all the same fields found in Basic Pages, with just a few additions. 

Date of publication 

No, this field does not let you have articles automatically publish themselves based on the date you enter, sorry. It does give your visitors an easy reference to the age of each article. It also provides the default sort order for any Blog or News list found on your site, with the newest articles rising to the top. 

Author 

With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site has. You also learned how, basically, you’ll never have to edit these fields. For our Blog and News content types, we have anticipated that at least sometimes, the person entering the content might not be the actual author of the 

2  

Page 3: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

content, and some other times, you might want to feature said authors with more than just their user account name, using their actual given and family names instead. This separate “Author” field lets you do just that, giving you the option to select another user account from your site, or to just enter a name, and to optionally have it link to this person’s website. 

 

Related People 

The News content type lets you relate any news item to People content in your site. You first must create the person in your site. Then you can use the “Related People” fields to create the link. All you need to do is start typing a name; don’t type too fast, as this is an “autocomplete” field; give it a chance to show you matches. 

Once you have added related 

3  

Page 4: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

people to your news item, you then need to select how you wish for them to appear on your news item. Your choices are “hidden” (the default choice), “Display text” (the person’s name as a link to their detail page, or “Display text and image” (name and their Featured Image, linking to their detail page). 

Please note: when you add a related person or people to a news item, the title of the news item and its Featured Image (if present) will appear automatically on the related person’s or people’s page(s). 

Taxonomy Terms 

The rest of the fields in these two content types are the ones you saw in Basic Pages, with a couple of exceptions:  

1. there are content-type-specific Taxonomy vocabularies available, from which you can assign terms to your content 

2. for Sitewide category terms, you can opt to display them on your news article, giving your site visitors an opportunity to see all of the content on your site that has been tagged with a particular term.  

As mentioned in Part 1, using a well thought out system of tagging your content, both with sitewide as well as content-type-specific terms, will give you greater flexibility in terms of presenting your content in a targeted fashion. We’ll go into this in greater detail in Part 3 of this training series.   

4  

Page 5: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

When “Sticky” is good 

In Part 1, we discussed the various non-functioning “Publishing options” that were available for Basic Pages. The same options are available here in Blog and News content types, only now you can easily apply them, or at least, the one that does something: “Sticky at top of lists”. 

By default, when Blog and News content appears in an automatic list, it is sorted by the date of publication. Newer items rise to the top, to keep things “fresh” and interesting. When you make a piece of content “sticky”, it jumps to the top of the lists. This lets you keep compelling content, that might not be the newest, from getting buried. If you make more than one item sticky, then those items occupy the top of your lists, sorted by publication date. Then come the non-sticky items. 

   

5  

Page 6: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

Events 

As you might have guessed, the single most-defining feature for Events is the “Date” field. This value defines where an event will appear when in a list of other events, how long an event will appear on a given page, and when an event will get relegated to a site’s events “archive”. 

Date values can range from super-simple to amazingly complex, depending on whether or not your event repeats on multiple occasions. Instead of having to create multiple event “nodes” for each instance, you can specify repeat rules, so you know that each instance has the same detail information (where, who, what, etc.). You also know that if any detail changes, you only have to update it in one place. Be aware, however, of two things to remember regarding repeating events: 

1. In your lists and calendars, they will occupy as much space as needed to list each iteration of the event 

2. On the event detail page, you will see a summary of the repeat rule(s) in place, and a list of all of the applicable dates, which can get a little unwieldy. 

However, they are still preferable over creating multiple event pages (or “nodes”). This option may be unavoidable, however, if, say, certain aspects of an event change for certain iterations. For instance, you may have a discussion group that meets four times a month, but each time is in a unique location. It would be up to you to decide whether or not you would want to have separate nodes for the event, one for each of its different locations, or if you would want to explain the location changes in the event’s body field.   

6  

Page 7: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

Some repeat rule examples for you: 

 

 

 

 

 

 

 

7  

Page 8: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

Repeat rules translated into page content: 

 

 

8  

Page 9: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

While the Date field may be the most-defining characteristic of Events, there are many other details unique to this content type. 

The mighty little checkbox 

Take the “Canceled” field, for instance. This little checkbox packs a bit of a wallop; checking it reveals a “Canceled Reason” field, and the content you enter here will be displayed prominently on your event detail page. The reasoning behind this is that, if you have an event that unexpectedly needs to be canceled, you can use your website to give attendees notice, and in a prominent fashion. Simple, yet powerful. 

 

9  

Page 10: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

Who should attend? 

The next field you’ll encounter is the “Audience” field. This is actually just another taxonomy field, but with a more-specific intent. 

Location, location, location 

In addition to the when and the what, you’ll likely want to tell your site visitors where your event takes place; we’ve got a field or two ready for you. There is the obvious “Location” field to get things started; you could end here as well, but when you fill this field out, the “Location ID” field is revealed, with its instructions on how you can use the “locations webfeed” to find the number needed to turn your location name into a link to the destination on Princeton’s mobile map. 

 

If you follow the “locations webfeed” link, on the subsequent page you can use your browser’s “find in page” functionality to search for the destination. From there, it’s short work to find the corresponding location code. 

 

10  

Page 11: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

 

 

With this information supplied, a link will be generated from your location title, taking visitors to that destination in Princeton’s mobile map. 

 

11  

Page 12: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

Speakers 

Next up is a compound field for speaker information. You may find you just want to list who will host the event; or you may have someone special coming, and so you want to highlight who they are, where they’re from, and if they provide their materials ahead of time, what they’ll discuss. Use the “add another item” to add information on as many speakers as are attending. 

 

And the rest… 

You will find the rest of the fields familiar, as they are the same as what is present in the Basic Page, Blog, and News content types, namely: 

1. Featured image 2. Sitewide and content-type-specific taxonomy terms 3. Menu link (although it is highly unlikely you will use this, a case was made that a 

department might have an event so significant, they’d want it to be featured in the menu structure) 

4. Publishing options 5. and Authoring information. 

 

12  

Page 13: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

People 

Remember back in Part 1, when I mentioned how there is one exception to the “every page gets a title” rule? The “Person” content type is it. Technically, there is a title. It’s automatically created from the name that you enter. But there is no visible “title” field for you to fill out, hence, the exception.  

That name field 

It’s pretty self-explanatory; you only need to fill out first (“given”) and last (“family”) names, but you can add additional information if you wish. People lists default to sorting by last name, as you would expect. 

 

Contact information 

So, there are a number of fields available here, and you are free to use as many or as few as you need. Some departments just use the name and Featured image fields for their people content. Others provide detailed biographical information. It all comes down to the preference of your department members, and what you can maintain. 

Position/Role/Title 

This compound field gives you three fields to describe an individual’s titles and/or functions here at the University. You can sort the individual fields by clicking and dragging the crosshairs, or alternately using the row weights. 

 

13  

Page 14: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

Assistant 

If there is someone in your department with an assistant you’d like to include on their detail page, use this field to do so. This field actually references another “Person” (page of the “Person” content type) in your site, so you’ll need to create the Assistant first. Then, when you start typing in this field to fill it out, you’ll see that other person’s name appear in this autocomplete field. For best results, type fairly slowly. 

Phone/Fax/Email/Website/Office Location 

These fields are self-explanatory. The “Office Location” field does not work like an event’s “Location” field. Not yet, anyway… 

Office Hours 

Expanding the “Office Hours” field reveals a method of indicating a person’s availability to assist students seeking academic assistance. You may end up never opening this, depending on whether or not you have faculty in your department… 

   

14  

Page 15: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

Curriculum vitae 

This is a “file field” that operates in a similar fashion as the Featured image field. Selecting this field brings you to the same Media Library as you would access when trying to add an image to your content. The key difference is that here, it is restricted to “document” formats (.pdf, .docx, etc.). 

Degrees, Publications List 

These two text fields are fairly self-explanatory. The only recommendation I have for you is to use the list format when filling them out. If you do not, you will likely end up with less-accessible content, as the information may be perfectly comprehended when read as list items, but not when read as regular paragraphs! 

 

 

15  

Page 16: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

And the rest… 

You will find the rest of the fields familiar, as you have seen them before in the Basic Page, Blog, Events, and News content types, namely: 

6. Featured image 7. Sitewide and content-type-specific taxonomy terms 8. Publishing options 9. and Authoring information. 

Courses 

Course content is unlike any other content type discussed so far. Its principle feature is the fact that you do not, and indeed cannot, create this content yourself. Instead, you rely on an external source, namely a “feed” coming from the Registrar’s Office. Tapping into this feed will automatically create Course content on your site. 

Automatic, or Manual? 

There are two primary methods of managing courses on your site, either automatically, letting our software poll the Registrar’s office looking for updates periodically; or manually, where you yourself run a script to get updated course information from the Registrar’s office when Semesters switch over.  

Automatic 

The automatic method lets you select the subjects for which you wish to display course content on your site, and then periodically checks with the Registrar’s Office to see if any information has changed. If so, the information is automatically updated, and the periodic checks continue. This is particularly evident when the semesters switch, from Fall to Spring, back to Fall, and so on. This method is useful if you simply want to offer current course information on your site, as you only have to set things up once, and let your site handle things in the background while you move on to other pressing tasks. 

Manual 

You may have other needs than that, though. You may wish to have a historical record of 

16  

Page 17: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

courses offered by your department, with the notion that, while they might not be offered at the moment, they, or something rather similar, might be available again in the future… Or perhaps you wish to show course information for the current term, as well as for the upcoming term. This way, someone with a finite amount of courses to take, can make educated decisions regarding when to take something now, or perhaps put it off for a semester in order to take something else, something that won’t be available later.  

How it’s done 

With either method, you begin by going to the “Courses” tab available on the “Content” administration page (or “/admin/content/migrate”). Select the “Import from Registrar’s feed” sub-tab to get started importing courses. 

 

Then select a term to import. As the helper text on the page states, 

“Current term” uses the latest available Fall or Spring term (i.e., the upcoming term if it has been published by the Registrar). If “Current term” is selected, the system automatically will look for updates to the Registrar’s feed every three days. 

You can also specify any of the other terms, knowing you will then have to manually manage course content. 

17  

Page 18: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

Selecting “Next” brings you to Step 2, where you will select subjects for which to import courses. After having finished, selecting “Next” again brings you to a confirmation page. You can select “Save import settings and run import” to have your subject selections saved, and to immediately have course content published on your site. 

You can create multiple “migration groups” for your site if you wish to have course information available for more than one academic term. You can manage these groups from your Courses “Dashboard”, where you can re-import your courses, cancel a wayward process, “Rollback” to delete imported courses, or remove your import settings entirely. 

 

18  

Page 19: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

Webforms 

Webforms are also a departure from the normal “fill-out-a-form-and-get-a-page” convention that you have become accustomed to by now. While there is still a form that you fill out with a Title and Body field (“Description” in this instance) and Publishing options and such, the really interesting stuff goes on in the other Webform-related tabs you’ll find when creating or editing these items. 

 

There is one noteworthy field on the create/edit form, that you want to make sure is selected, namely the “Enable Captcha” field. Without it, you’re likely to receive a number 

of spam submissions to your form, and who has time for things like that these days? 

What’s under the Webform tab? 

There are four sub-tabs that live here, each of which lets you add functionality to your form, from fields to fill out, to sending e-mail, to redirecting visitors after completion. 

Form components 

“Components” is a fancy way of saying “fields”, as in adding fields to your form for your visitors to fill out. There are a number of types available, from basic text fields, to name fields like you saw in the Person content type, to prepopulated select lists. 

 

19  

Page 20: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

Conditionals 

“Conditionals” are a way of adding an “if - then” statement to your form, to have it react to specific conditions. For instance, let’s say you have a field that asks visitors to choose an entry from a list of items, with a choice of “other”; but rather than just select that as an answer, you want visitors to fill in a text field to tell you what that “other” value is. But, you don’t want this text field available for everyone, for fear of having visitors fill it out when they shouldn’t. Using Conditionals, you can very easily set up a “hidden” text field, that only becomes visible when visitors select “other” from that list of items. 

 

E-mails 

Yes, your Webforms can be set up to send e-mail for you, or to you, or both! You may wish to set it up so that you’re e-mailed any time someone fills out your form; or to have a confirmation sent upon completion; or you may be collecting information that needs to go to someone else in your department, or another department or third-party entity entirely. This can be done easily with Webforms. 

 

20  

Page 21: Drupal CMS Support - Expanding beyond the Basic · With Basic Pages, you learned about the standard “Authoring information” fields that every piece of content in a Drupal site

Form settings 

Here is where you can configure various administrative settings for your form, such as: 

1. a confirmation message 2. a page visitors are redirected to after they’ve filled out your form 3. how many submissions to accept 4. whether or not the form is open 5. among other things… 

 

The Results tab 

Here is where you can see all of the data collected by your form. There are a few different ways of looking at it, but perhaps the most useful is under the “Download” sub-tab. Here is where you can export your results to a spreadsheet, which you can use to otherwise parse and process your data to your heart’s content. 

 

 

21