﻿<?xml version="1.0" encoding="UTF-8"?>
<!--RSS generated by Windows SharePoint Services V3 RSS Generator on 9/9/2010 9:07:08 PM-->
<?xml-stylesheet type="text/xsl" href="/Resources/tutorials/_layouts/RssXslt.aspx?List=595ba6cc-999c-4b83-8d5c-abe66bc7c867" version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Tutorials: Tutorials</title>
    <link>http://www.baltimoresug.org/Resources/tutorials/Tutorials/Forms/AllPages.aspx</link>
    <description>RSS feed for the Tutorials list.</description>
    <lastBuildDate>Fri, 10 Sep 2010 02:07:05 GMT</lastBuildDate>
    <generator>Windows SharePoint Services V3 RSS Generator</generator>
    <ttl>60</ttl>
    <image>
      <title>Tutorials: Tutorials</title>
      <url>/Resources/tutorials/_layouts/images/homepage.gif</url>
      <link>http://www.baltimoresug.org/Resources/tutorials/Tutorials/Forms/AllPages.aspx</link>
    </image>
    <item>
      <title>Dynamic News Slider for MOSS 2007</title>
      <link>http://www.baltimoresug.org/Resources/tutorials/Tutorials/Forms/DispForm.aspx?ID=8</link>
      <description><![CDATA[<div class=ExternalClass1EBA3E4AD28545F58FD33CF4A3362390><a href="/Resources/tutorials/TutorialFlash/condformatIp/condformatIp.html"><img height=136 src="/site_images/movie.jpg" width=200 border=0></a><br><br><a href="/Resources/tutorials/TutorialFlash/condformatIp/condformatIp.html">click here for Volume 3 InfoPath and Moss</a> 
<div class=ExternalClassAE9CCC5C9C2648C588F245C69164DEC1>
<div>
<div class=articletitle><strong><font color="#606060">Dynamic News Slider for MOSS</font></strong></a></div>By EricHarlan<br>Published: May 11, 2008<br>Updated: May 11, 2008<br><br>
<div style="border-right:medium none;padding-right:0in;border-top:medium none;padding-left:0in;padding-bottom:4pt;border-left:medium none;padding-top:0in;border-bottom:1pt solid">
<p class=MsoTitle><font size=5><b>Dynamic News Slider for MOSS</b></font></p></div>
<p class=MsoNormal>There are MANY ways to accomplish this task; however each has their pros and cons. Based on requirements we had in this instance flash web parts, ad rotators etc would not work.<span> </span>However this is most certainly probably not the only way to do this which seems to usually ring true with most MOSS solutions.</p>
<p class=MsoNormal>In this case we needed a specific design element to ring true and keep with the branding of our MOSS site.<span> </span>The requirements were as follows:</p>
<p class=MsoListParagraphCxSpFirst style="text-indent:-0.25in">&lt;!---News teaser had to have a primary Title</p>
<p class=MsoListParagraphCxSpMiddle style="text-indent:-0.25in">&lt;!---News teaser had to have a secondary title</p>
<p class=MsoListParagraphCxSpMiddle style="text-indent:-0.25in">&lt;!--- News teaser had to have a teaser content text area</p>
<p class=MsoListParagraphCxSpMiddle style="text-indent:-0.25in">&lt;!--- News teaser had to have a link to the actually news story that lived in the news publishing site</p>
<p class=MsoListParagraphCxSpLast style="text-indent:-0.25in">&lt;!--- News teaser had to have a picture that went along with the story.</p>
<p class=MsoNormal>Our first attempt at this was to place some DHTML/Javascript into a CEWP (content editor web part), and place a css file, a “loading” image, and a javascript file into a document library folder that the CEWP would reference.<span> </span>This method was written about by Chris Rivera wrote about <a href="/Resources/tutorials/Tutorials/Dynamic%20Content%20Tip%20(MOSS%202007).aspx"><font color="#606060">HERE</font></a>. This was our result. (Note the outlined portion in red)</p>
<p class=MsoNormal style="text-align:center" align=center><a href="/Resources/tutorials/TutorialFlash/DelMonte_homepage_v15_final.jpg" target="_blank"><img height=245 src="/Resources/tutorials/TutorialFlash/DelMonte_homepage_v15_final.jpg" width=445 border=0></a></p>
<p class=MsoNormal>This gave us exactly what we needed, however it had one major drawback.<span> </span>The Power user that needed to update the content on a daily basis had no coding skills. To update the content the user had to go into the CEWP and edit some very simple lines of code to get the teaser to show up.</p>
<p class=MsoNormal>There were a few options we looked into to solve this problem. The first one was creating a flash file that pulled xml into it and displayed content accordingly. The next was to use a flash rotator, but this would require the user to create image files, same for an ad rotator. The only other option we could think of on such short notice (a week), was to create an InfoPath form that would harvest the news teaser information and image and then send off a workflow to get pulled into a list etc.</p>
<p class=MsoNormal>A fellow Sogetian Dave Wollerman, suggested creating a custom list in SharePoint, and adding the list as a web part on a temporary page you create to get this working. Then open the page up in SharePoint Designer, and convert the list to a XSLT view. You would then save the page, customizing it and returning the page on the browser. You would then write your xsl to match the columns you created in your custom list.<span> </span>Lastly, exporting the new web part and importing it on the home page where you don’t have to break the dependency on the site definition (or you don’t have to customize your home page).</p>
<p class=MsoNormal>Here’s how we did it.</p>
<p class=MsoNormal>First a few preliminary things that we created to support this method,<span> </span>you should have a working understanding of XSLT, you need to have console rights to all web front end (wfe) SharePoint servers. And you need to have admin rights on the SharePoint install.<span> </span></p>
<p class=MsoNormal>Now, the step by step (with pictures no less).</p>
<p class=MsoListParagraphCxSpFirst style="text-indent:-0.25in">&lt;!--  1. First thing we need to do is copy the three slider files to the WFE servers.</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in">- Navigate to the following directory on your WFE(s) C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in">- Create a folder Called “Client” then a folder inside of that called “Slider”</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in">- So now you should have a path that looks like this C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\Client\Slider</p>
<p class=MsoListParagraphCxSpLast style="margin-left:1in;text-indent:-0.25in">- Now copy in to the slider folder<font color="#606060"><a href="/Resources/tutorials/TutorialFlash/slider.zip">“contentslider.js”, “contentslider.css” and “loading.gif”</a><a href="/tutorials/slider.zip"></font></a></p>
<p class=MsoNormal>Note, these are the files I used so they have been coded to our needs you may have to change the css to get it to look the way you like.</p>
<p class=MsoListParagraphCxSpMiddle style="text-indent:-0.25in">&lt;!-- 2. Next, lets create our custom list.</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in">- Go to the root site that your news slider will eventually live.</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in">- Go to site actions &gt; Create </p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in">- Select Custom list</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in">- Name it “newsslider”</p>
<p class=MsoListParagraphCxSpLast style="margin-left:1in;text-indent:-0.25in">- Hit ok</p>
<p class=MsoNormal style="margin-left:0.75in">**Follow steps F-J only if you will use the same column names we have used. If you do not intend to or you want to add additional columns you will need to make your own adjustments to the xsl.</p>
<p class=MsoNormal style="margin-left:0.75in">Create the following columns, case sensitive.</p>
<p class=MsoListParagraphCxSpFirst style="margin-left:1in;text-indent:-0.25in">- Title – is already there no worries</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in">- secondarytitle – single line of text</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in">- contenttext – multiple lines of text, plain text only</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in">- morelink – hyperlink</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in">- picurl – picture</p>
<p class=MsoListParagraphCxSpLast style="margin-left:1in;text-indent:-0.25in">- Enter in some dummy content for now (two items should be good enough do not attach a image file to the list item, link to one in a news portal *read notes below*)</p>
<p class=MsoListParagraphCxSpLast style="margin-left:1in;text-indent:-0.25in"> </p>
<p class=MsoListParagraphCxSpLast style="margin-left:1in;text-indent:-0.25in"> </p>
<div style="text-align:center"><a href="/Resources/tutorials/TutorialFlash/sliderlib.jpg" target="_blank"><img height=277 src="/Resources/tutorials/TutorialFlash/sliderlib.jpg" width=414 border=0></a></div>
<p> </p>
<p class=MsoListParagraphCxSpLast style="margin-left:1in;text-indent:-0.25in"> </p>
<p class=MsoNormal><span></span> </p>
<p class=MsoListParagraphCxSpFirst style="text-indent:-0.25in">&lt;!-- 3. Next step is to add your list to your “staging” sub site.</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in"><span><span>a.<span> </span></span></span>Go to your subsite</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in"><span><span>b.<span> </span></span></span>Site actions &gt; edit page</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in"><span><span>c.<span> </span></span></span>Add the “newsslider” list as a web part</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in"><span><span>d.<span> </span></span></span>Exit Edit mode</p>
<p class=MsoListParagraphCxSpMiddle style="text-indent:-0.25in">&lt;!-- <span><span>4.<span> </span></span></span>Now we need to convert the web part to XSLT view</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in"><span><span>a.<span> </span></span></span>Open up SharePoint Designer</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in"><span><span>b.<span> </span></span></span>Open Site</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in"><span><span>c.</span></span>Navigate to the site where your list is now a web part on the page</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in"><span><span>d.<span> </span></span></span>Highlight the now on the page list web part</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in"><span><span>e.<span> </span></span></span>Right click and select “Convert to XSLT Data View”</p>
<p class=MsoListParagraphCxSpLast style="margin-left:1in;text-indent:-0.25in"><span><span>f.<span> </span></span></span>Save the page (yes save)</p>
<p class=MsoNormal>Saving the page, will prompt an alert asking if you want to customize the page away from the site definition. We’ll address this later. If for some reason things go wacky you can go to File &gt; Reset to site definition to revert your changes.</p>
<p class=MsoListParagraphCxSpFirst style="text-indent:-0.25in">&lt;!-- <span><span>5.<span> </span></span></span>Adding the XSL to your web part.</p>
<p class=MsoListParagraphCxSpMiddle style="margin-left:1in;text-indent:-0.25in"><span><span>a.<span> </span></span></span>Modify the shared web part</p>
<p class=MsoListParagraphCxSpLast style="margin-left:1in;text-indent:-0.25in"><span><span>b.<span> </span></span></span>You will now have an XSL Editor button, click it and paste the following:</p><br><i><span style="color:red"></span></i><i><span style="color:red"><a href="/Resources/tutorials/TutorialFlash/dynamicsliderxml.txt" target="_blank"><font color="#606060">CLICK HERE TO GET THE XML CODE YOU'LL NEED, PASTING IT KEPT SCREWING UP THE PAGE.</font></a><br></span></i>
<p class=MsoListParagraphCxSpFirst style="margin-left:1in;text-indent:-0.25in"><span><span>c.<span> </span></span></span>Click OK</p>
<p class=MsoListParagraphCxSpMiddle style="text-indent:-0.25in">&lt;!-- <span><span>6.<span> </span></span></span>Everything should be working at this point. The first thing to do if things aren’t working correctly the first thing you should do is make sure the column names match up. Remember, if you created the columns prior and named them incorrectly, renaming them will not work. You must delete the column first then read it.</p>
<p class=MsoNormal>Here’s what your finished product should look like:</p>
<p class=MsoNormal> </p>
<p class=MsoNormal><img height=233 src="/Resources/tutorials/TutorialFlash/finished.jpg" width=580></p>
<p class=MsoNormal><span><br></span> </p>
<p class=MsoNormal>Notes:</p>
<p class=MsoNormal>If you want to get this to work without customizing your page, export the web part and import that into your SharePoint web part gallery so you can just add it to your main page, or wherever you need to add it to. Just take into account that you will need to make sure your custom list is in the same root site as the web part.</p>
<p class=MsoNormal>Also, the “morelink” is best used when pointing to an existing news publishing page. What we did in our case was to setup a news publishing site, had the user post up her news and publish the file, essentially creating a new, news page.<span> </span>Once that was done she could then create the list item that feeds your news teaser with a location for the MORE link. This also gives an image for the teaser list if the news article was setup with an image prior.</p>
<p class=MsoNormal> </p>
<p class=MsoNormal>Here are all the files needed to reproduce the above article <a href="/Resources/tutorials/TutorialFlash/slider.zip">HERE.</a></p><br></div></div></div>]]></description>
      <author>Shadeed Eleazer</author>
      <pubDate>Wed, 15 Oct 2008 03:02:58 GMT</pubDate>
      <guid isPermaLink="true">http://www.baltimoresug.org/Resources/tutorials/Tutorials/Forms/DispForm.aspx?ID=8</guid>
    </item>
  </channel>
</rss>