Sample Site Slider (rotating banner) widget

  • Updated

This is a sample site image slider for testing purposes. This sample custom widget was tested in version 9.1 SP1 and 9.0 SP2.

* Note: This is a custom widget and may not work for some use cases. 

Code Sample

 

File Contains:

  • Site-Slider ascx , .cs, and .jpg control files
  • Supporting files ( JS, css, images)
  • XML for Smart Form the widget pulls the data from
  • SiteSlider.cs App Code file

 

How to use:

In the site root:

  1. Place the siteslider.cs file in the App Code folder of your site root

    folder
  2. Place the Site-Slider ascx, .cs and .jpg control files and SiteSlider supporting folder in the Widgets folder under " YourSiteRoot"/ Widgets 
  3. Folder2

In the workarea:

  1. Create a new Smart Form in the workarea > Settings > Smart Form configuration:
  2. In the source view of the smart from place the contents from the SiteSliderSmartFormXML.txt file and save the smart form: SliderText
  3. Create a new Folder in the workarea > Content Tab
  4. Assign the newly created smart form to the folder.
  5. Create new HTML smart form. It should look like the following: slider1
  6. In the smart form you can add a speed in milliseconds, Title, Image, Summary, and add a link. There is also an option to add additional slides
  7. Finally after you saved the Smart From content item, open up the Site-Slider.asxc.cs file in an editor of choice and change the uxBannerContentBlock.DefaultContentID to match the ID of your smart form content item created in the workarea and save: SliderCodeSnippet
  8. Finally navigate to the workarea > Settings > Personalizations > Widgets and click the SYNCHRONIZE WIDGETS FROM /WIDGETS/ FOLDER button to add the widget to the system: sliderSync
    7. And your Done!