Hello, I built a very simple Flash photo banner rotator module that consists of just the .ascx file and then a few settings pulled in the feature settings area. Works good, very simple.
One of the settings the user needs to change is to enter the folder where the images should pull from. What I would like to do is only make the user enter the folder from their file area forward and not have to enter the whole beginning of the path /data/sites/3/....
Note the bold code below: How can I prepopulate the module below to grab the current SITE ID and place it in my code below?
<%@ Control Language="C#" ClassName="BannerRotator.ascx" Inherits="mojoPortal.Web.SiteModuleControl" %>
<%@ Import Namespace="mojoPortal.Business" %>
<%@ Import Namespace="mojoPortal.Business.WebHelpers" %>
<%@ Import Namespace="mojoPortal.Web.Framework" %>
<%@ Import Namespace="mojoPortal.Web.Controls" %>
<%@ Import Namespace="mojoPortal.Web.Editor" %>
<%@ Import Namespace="mojoPortal.Net" %>
<portal:ModuleTitleControl id="Title1" runat="server" />
<asp:Panel ID="pnlMyClass" runat="server" EnableViewState="false" CssClass="modulecontent">
<script type="text/javascript" src="_Include/swfobject/swfobject.js"></script>
<div id="BannerRotator"></div>
<script type="text/javascript">
var so = new SWFObject("_Custom/Modules/BannerRotator/preview.swf", "preview", "<%Response.Write(Settings["Width"].ToString());%>", "<%Response.Write(Settings["Height"].ToString());%>", "7", "#333333");
so.addVariable("dataFile", "_Custom/Modules/BannerRotator/auto.asp?Path=/Data/Sites/3/<%Response.Write(Settings["ImagePath"].ToString());%>");
so.addVariable("SlideDuration", "<%Response.Write(Settings["SlideDuration"].ToString());%>");
so.addVariable("SlideWidth", "<%Response.Write(Settings["Width"].ToString());%>");
so.addVariable("SlideHeight", "<%Response.Write(Settings["Height"].ToString());%>");
so.addParam("wmode", "transparent");
so.write("BannerRotator");
</script>
</asp:Panel>