IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
After you FancyImageGallery widget: Create the web user control, you need to implement the markup for the new user widget in its .ASCX file. Then, you need to implement the code in the .JS file that will associate it with the markup.
In the markup of the FancyImageGallery.ascx add the following code:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FancyImageGallery.ascx.cs" Inherits="SitefinityWebApp.CustomImageGallery.FancyImageGallery" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
<
sf:ResourceLinks
ID
=
"resourceLinks1"
runat
"server"
UseEmbeddedThemes
"false"
>
sf:ResourceFile
Name
"~/CustomImageGallery/FancyImageGallery.css"
Static
"true"
/>
"~/CustomImageGallery/fancybox/jquery.fancybox-1.3.4.css"
</
ul
asp:Repeater
"ImageRepeater"
ItemType
"Telerik.Sitefinity.Libraries.Model.Image"
ItemTemplate
li
a
class
"grouped_elements"
rel
"group1"
href
"<%# Eval("
MediaUrl") %>">
img
"thumbImg"
src
MediaUrl") %>" alt="image" />
In the code above, a simple <asp:Repeater> element that generates a <li> element for each image that is passed to it. The <sf:ResourceFile> is used to load the .CSS file resources by passing their relative paths.
You now need to FancyImageGallery widget: Implement the client-side functionality of the new user widget.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important