Fils de syndication

Vous cherchez la BOEW v3.1?

La BOEW v4.0 est maintenant la version courrante. La version de la page actuelle pour la BOEW v3.1 a été déplacée.

Questions ou commentaires?

Needs translation

Purpose

The purpose of this feature is to provides a widget for aggregating and displaying the entries from one or more Web feeds on a Web page. Supported Web feed formats are Atom, RSS, and Media RSS.

Use when

  • Promoting and sharing information from Web feeds on a Web page

Working example

How to implement

  1. For each Web feed, create a div element with class="wb-feeds".
    <div class="wb-feeds"></div>
  2. Inside the div element created in the previous step add a section element.
  3. Inside the section element add a heading (h1 - h6).
  4. Add an unordered list (ul) after the heading with the feeds-cont class.
  5. For every Web feed source to display, add a list element containing a link to the feed:
    <li>
    	<a href="http://canada.ca/sample.atom">Sample Atom Feed</a>
    </li>

Example code

<section class="wb-feeds limit-5">
	<h3>Road News Releases and Safety Recalls</h3>
	<ul class="feeds-cont">
		<li>
			<a href="http://www.tc.gc.ca/mediaroom/rss/road.xml" rel="external">Road News Releases (All)</a>
		</li>
		<li>
			<a href="http://wwwapps.tc.gc.ca/Saf-Sec-Sur/7/VRDB-BDRV/search-recherche/rss.aspx?lang=eng" rel="external">Road Safety Recalls</a>
		</li>
	</ul>
</section>

Configuration options

Document the public configuration options that can be used by implementers or developers.

Option Description How to configure Values
limit-x Controls the amount of items the Web feeds widget will display. Add the limit-x class after the wb-feeds class and replace x with an integer.
limit-4 (default):
Limits display to four items.

Events

Document the public events that can be used by implementers or developers.

Event Trigger What it does
wb-init.wb-feeds Triggered manually (e.g., $elm.trigger( "wb-init.wb-feeds" );). Used to manually initialize the Feeds widget. Note: The Feeds widget will be initialized automatically unless it is added after the page has already loaded.

Source code

Feeds widget source code on GitHub

Date de modification :