XML Reader Accordion for Newswire
- aka SM.reader
- Can be used to show either Newswire or MedEvents information, but not both at this time (one device per page)
- You must have a channel in Newswire [link tk], or a channel in MedEvents [link tk]
- Installation and use is an advanced developer activity; editing code in Dreamweaver is required
- The device will fill the available width of the whatever container you put it in.
- The minimum width in which this device should be used is ??? pixels.
- Install scripts and CSS references in editable section of document head
- Set device parameters as described in code comments and below
- Place the "reader" div where you want the device
How to install
In the <head></head> section, after the comment "<!-- PUT SUPPLEMENTAL STYLES AND SCRIPTS HERE -->" place this code:
<!-- BEGIN XML READER CODE -->
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.5.2/build/yahoo-dom-event/yahoo-dom-event.js&2.5.2/build/animation/animation-min.js"></script>
<script type="text/javascript" src="/Templates/reader.js"></script>
<link rel="stylesheet" type="text/css" href="/Templates/reader.css" />
<script type="text/javascript">
/* <![CDATA[ */
SM.reader.loadUserParams = function() {
numberOfItems = 10; // number of items to display
showAllItems = false; // true shows all; false = accordion
showTitlesOnly = false; // false for accordion; true for titles only
showFirstItem = true; // if true, show first item
clickstyle = true; // false activates mouseover to open
category = "hom"; // newswire category to display
expandedHeight = 110; // height of items when expanded
collapsedHeight = 28; // height of items when collapsed
}
SM.addToInit(SM.reader.init);
/* ]]> */
</script>
<!-- END XML READER CODE -->
* and in the HTML:
<div class="reader" id="reader"></div>

