Manual: News

Types of news

Feed Items come from the RSS feeds of other websites or blogs.

  • The main RSS feed on each area website is typically from Nebraska Today, added as a 'Feed' content type.
  • View the RSS feeds on your site by going to 'Content' and filtering the list by type 'Feed'.
  • You can view the items from RSS feeds by going to 'Content' and filtering the list by type 'Feed Item'.
  • Feed items link to the source of the RSS feed.

News items are manually added using the News Item content type.

  • You can view these by going to 'Content' and filtering the list by type 'News Item'.
  • News Items link to the story on your site, where the story is stored.

Add a News Item

  • Select 'Add Content'
  • Select 'News Item'
  • 'Title': the headline
  • 'Body': the news item
  • 'IMAGES': Select 'Choose File', locate the image in the file explorer, click 'Open', and click 'Upload'. This image will show up in your teaser entry. If no image is uploaded, there will be a graphic with a red background and white Nebraska N placed there automatically.
  • Select 'Save'.

Remove a Feed Item

Feed Items need to be unpublished. If you delete a Feed Item, the RSS feed will replace the item on your site.

  • Find it in your content list. The list defaults to last added/updated, but you can filter by Feed Item.
  • Click the check box on the left.
  • Under UPDATE OPTIONS at the top of the list, select 'Unpublish Selected Content' from the dropdown and click 'Update'.
Alternatively, you can:
  • Find the item in the content list
  • Click Edit, or click the name of the entry, then the Edit tab to the right
  • If the Menu Link Title field near the bottom of the page (in the Site Hierarchy section) is blank, highlight and copy the News Item title field (which then usually fills this field by itself)
  • Click Publishing Options at the bottom of the page and uncheck the Published box
  • Click Save

Add a photo to a Feed Item

Sometimes Feed Items do not include an image. You will see a red box where the image should be in the teaser entry. There's either no image in the original post, or the CMS Feed Module didn't find the image.

You can either get the photo from the original post (You can usually right-click the image and select Save As..., depending on the browser) or use another image.

If the image is not from UNL Today, it may be protected by copyright and require the owner's permission and possibly payment.

UNL Today photos are usually 960 pixels wide by 540 pixels high, with the exception of vertically-oriented portraits and other items such as logos. Teaser entries display photos at 247 pixels wide by 139 pixels high in grid format. If you use your own photo, matching these dimensions will look the best. A gray border displays around photos that don't match those sizes (such as vertical portraits).

  • Find the Feed Item and click Edit.
  • Highlight and copy the Title field copy (to fill in the blank Menu Title field below)
  • Scroll down to IMAGES and click Choose File. After you find and select the image from your computer, click the Upload button.
  • Click Save at the bottom.
  • Find the Feed that the Feed Item is from and confirmt that the Feed Image Grabber is enabled (see instructions below for adding an RSS feed for more information).

Add an RSS Feed

Each department website is set up to pull in news articles from Nebraska Today using a department tag selected by University Communication that will filter news relevant only to the department. For example, stories on Nebraska Today relevant to the Department of Physics have a “Physics” or “Department of Physics” tag. Each tag has an RSS feed.

You can add RSS feeds from other websites or blogs. Make sure that you want every entry from the source to be added to your website. For example, the Department of Physics shouldn’t add a generic “science” RSS feed from a publication; they should add an RSS feed specific to physics.

To set up a news feed

1. Go to Content > Add Content and choose Feed from the list of content types.

2. In the Title field, type a descriptive name to identify the feed.

3. In the URL field, type (or paste) the URL of the RSS feed. 
Note: If the RSS feed URL is not clear, look at the page source for: 
<link rel="alternate" type="application/rss+xml" href=”…” />.  
If this exists, you can use the URL of the page you are viewing the source on and the Feed module will pull in the URL from the alternate link tag.

4. Click ‘Feeds Image Grabber’ and check ‘Enable Feeds Image Grabber’.

5. If this is a UNL Today news feed, skip to step 6.

Otherwise, identify the HTML "id" attribute or "class" name for the image of each item pulled in.  Go to a couple of the news items and view the html source code (Ctrl + U or Tools > View Source).  Find the primary image, then look at the containing HTML tags for a consistent ID or class name (id=”name” or class=”name”). See examples below.

6. In the ‘Search for the images…’ section, select ‘a Class’ if this is a UNL Today news feed, or select either ‘an ID’ or ‘a Class’ based on what you found in step 5.

7. In the ‘ID or Class of the HTML Tag’ field, type ‘file-image’ for a UNL Today news feed, or type the name you found in step 5.

8. Go to the bottom of the page.

9. On the Revision Information tab, uncheck ‘Create new revision’.

10. On the Publishing Options tab, uncheck ‘Promoted to front page’.

 

Examples for Step 5:

ID example

<article id=”name” class=”...”>
    <div class=”content”><img src=”http://news.unl.edu/sites/ featureimage.jpg” /></div>
</article>

Class example

<div class=”name”>
    <div class=”content”><img src=”http://news.unl.edu/sites/ featureimage.jpg” /></div>
   </div>

Technical stuff

The news and article page templates are part of a larger more rigid system. It is best to think of the news template as the page that displays the list of news items and the article template as the page that displays a specific news item.

If you are interested in what went into this process, it is documented here http://unlcms.unl.edu/guide/feeds-module/.

If you find the need to change how the feed module works, you will want to be familiar with the setup of the feeds module http://unlcms.unl.edu/guide/feeds-module/ and select an appropriate setting from the Update existing nodes option found in the Structure > Feeds Importer > Edit Feed > Processor > Node Processor > Settings screen.

Currently, tagging has not been implemented, primarily because it would not be possible to auto assign tags from external news feeds, but if your department would like this feature, it can be added at a later time using custom taxonomies. This is a more advanced feature and will require modifying the news and article page Twig templates. You can read more about taxonomies at https://drupal.org/documentation/modules/taxonomy.