Reliable DotNetNuke Hosting Tutorial :: How To Create An Announcement With A Slider

HostingReviewASP.NET | Reliable DotNetNuke Hosting Tutorial. DotNetNuke has come a long way recently with making things much more w3 compliant. This has allowed for more than just cleaner code; it has also allowed for much more control of your website through jQuery and CSS. Also, according to the forums, it looks like things are getting even better for compliance and control. In this tutorial, we will tell you how to create an announcement with a slider in DotNetNuke.

How To Create An Announcement With A Slider in DotNetNuke

One of our favorite updates of DNN modules to this new compliance, is the DNN Announcements module. With the latest release, we now have the ability to set up the announcements as a list and apply some cool jQuery to it. We decided that we wanted to have the main image fade in and out and the title and description to slide in from the bottom. We came across the s3Slider jQuery plugin which seemed to provide exactly what I was looking for. We have outlined the steps below on how to add it to your DotNetNuke site.

The HTML

1. Add the Announcements module to your page.

2. Click the “Settings” link.

3. Expand the “Announcements Settings”

4. Remove exisiting code from Header Template, Item Template, and Footer Template.

5. In the “Header Template:” text area, enter the following code:

<div id="s3slider">
<ul id="s3sliderContent">

6. In the “Item Template:” text area, enter the following code:
If you want your description area to be at the top of the image area, use the class top in the span.
If you want your description area to be at the bottom of the image area, use the class bottom in the span as I have here.

<li class="s3sliderImage">
[IMAGESOURCE]<span class="bottom"><strong>[TITLE][EDIT]</strong><br />
[DESCRIPTION]<br />
[READMORE]</span>
</li>

7. In the “Footer Template:” text area, enter the following code:

<li class="clear s3sliderImage"></li>

8. Also, in the “Footer Template” area close out the ul and div that was started in the “Header Template” area.

The CSS

In your skin.css file, insert the following styles: (note the widths and heights in the CSS. They need to be exactly the same as the image for the announcemnts.)

#s3slider { width: 500px; height: 242px; position: relative; overflow: hidden;}
#s3sliderContent { width: 500px; position: absolute; top: 0; margin-left: 0;}
.s3sliderImage { float: left; position: relative; display: none;}
.s3sliderImage span { position: absolute; font: 14px/21px Arial, Helvetica, sans-serif; padding: 10px 13px;  width: 500px; background-color: #000; filter: alpha(opacity=70); -moz-opacity: 0.7; -khtml-opacity: 0.7; opacity: 0.7; color: #fff; display: none;}
.top { top: 0; left: 0;}
.bottom { bottom: 0; left: 0;}

The jQuery

Now that we have all of that in place, we can add the jQuery to make it work.

1. Include a refrence to jQuery in your skin. This is already done if widgets are inabled on your site.

2. Download the files from the s3Slider site. http://www.serie3.info/s3slider (link opens in new window)

3. Upload the s3Slider.js file to your skin folder.

4. In your skin file (for example: skin.ascx), enter the following code: (you can put this at the top or the bottom of your skin)

<script type="text/javascript" src="<%= SkinPath%>s3Slider.js"></script>
<script type="text/javascript">
    $(document).ready(function() { 
       $('#s3slider').s3Slider({ 
          timeOut: 7000 
       });
    });
</script>

5. Now just start adding the content of your announcements! Be sure to make your images the same size as what is set in the CSS.

Reliable DotNetNuke Hosting Recommendation

ASPHostPortal.com

ASPHostPortal.com is Perfect, they have a suitable hosting plan for a starter in DotNetNuke Hosting. ASPHostPortal is the leading provider of Windows hosting and affordable ASP.NET Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.

HostForLIFE.eu

HostForLIFE.eu guarantees 99.9% uptime for their professional DotNetNuke hosting and actually implements the guarantee in practice. HostForLIFE.eu is the service are excellent and the features of the web hosting plan are even greater than many hosting. HostForLIFE.eu offer IT professionals more advanced features and the latest technology. Relibility, Stability and Performance of  servers remain and TOP priority. Even basic service plans are equipped with standard service level agreements for 99.99% uptime. Advanced options raise the bar to 99.99%. HostForLIFE.eu revolutionized hosting with Plesk Control Panel, a Web-based interface that provides customers with 24×7 access to their server and site configuration tools.

DiscountService.biz

DiscountService.biz is The Best Cheap and Reliable DotNetNuke Hosting. DiscountService.biz was established to cater to an under served market in the hosting industry web hosting for customers who want excellent service. DiscountService.biz guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability. DiscountService.biz has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. DiscountService.biz is devoted to offering the best Windows hosting solution for you.

Comments are closed.

Top