Friday, December 12, 2014

A Byline To A Drupal Blog

The default Drupal configuration lets you easily add a byline to content; however, it doesn't offer much customization. For example, you can only display an author's username. You cannot select a custom display name, such as a professional author's byline. Fortunately, the Drupal taxonomy system offers a solution for this. You can create a custom field to add to your articles or blog posts, which allows you to create author or contributor bylines.


Instructions


1. Log in to your Drupal website and click on "Structure," then click "Taxonomy."


2. Click on "Add Vocabulary." Type "Author" or "Contributor" in the "Name" box. Click on "Save."


3. Click on "Add Terms" next to the vocabulary you created.


4. Type the author's byline in the "Name" box. Scroll down to the URL alias section and type the address you want users to visit when visiting the author's post link. For example, you could type "/author/authors-name" without the quotations. Click on "Save."


5. Click on "Structure" then click "Content Types." Click on "Manage Fields" next to "Article."


6. Scroll down to the "Add New Field" section. Select "Term Reference" beneath "Select a Field Type."


7. Type "Written by," "Submitted By" or whatever you want to appear before the author's name, in the "Label" field. Type the same thing in the "Field Name" section. In the "Field Name" section, use dashes or underscores to replace spaces.


8. Click on "Select a Widget." Select "Check boxes" or "Autocomplete form." The former will lists authors in a check box style widget on the article creator form. The latter lets you manually type in the author's name and completes it for you based on the first few letters. Click on "Save."


9. Click on "Manage Display." You'll see the "Written By" (or the custom name you've used for it) field in the display tree. Click on the "Format" arrow and select "Link" or "Plain Text," depending on how you want the author's name to display. Click on the "Label" arrow and select the location of the author's name. Here you'll choose where on the article page the byline appears. Click on "Save."