Login   |  Register   |  Agent Login
  Search

Guided Walking Tours

DotNetNuke; using DotNetNuke.Entities.Modules; using DotNetNuke.Services.Localization; using XPL.Proxy; using XPL.ConfigurationProxy.Skinning; using XPL.ConfigurationProxy; using XPL.Utils; using System.Linq; using XPL.Common; using XPL.Common.Templating; using XPL.Proxy.XPLProxyWebV3; { var _portalId = Model.ExtensionData.PortalModuleBase.PortalId; var _modulePath = Model.ExtensionData.PortalModuleBase.ControlPath; var _portalModuleBase = Model.ExtensionData.PortalModuleBase; var _skinPath = new SkinController().GetCurrentSkin().SkinRelativePathOnly; var _productDetailTabId = Model.ExtensionData.DetailTabId; var _localResourceFile = Model.ExtensionData.LocalResourceFile; var Products = (List)Model.Products; var _specials = Model.ExtensionData.Special; } foreach (var p in Products) { var _linkUrl = DotNetNuke.Common.Globals.NavigateURL(_productDetailTabId, "", "", "pid=" + p.id + "&lid=" + p.myOrigin.id); var myImage = ImageHelper.GetImage(p.allImages, ImageTypes.Primary);
ShowImage(myImage, 80, _portalId, _skinPath, _modulePath)p.name
ShowRate(p, Localization.GetString("RatePrefix", _localResourceFile))
TextHelper.GetDefaultText(_specials, p.allText)
} { //----------------------------------------------------- helper ShowImage(XPLImage image, int width, int portalId, string skinPath, string controlPath) { var strImagePath = ""; var strAltText = ""; if (image != null) { strImagePath = controlPath + "Image.aspx?file=" + image.url + "&width=" + width.ToString() + "&pid=" + portalId.ToString(); strAltText = image.name; } else { strImagePath = controlPath + "Image.aspx?file=" + skinPath + "images/no_thumbnail.gif" + "&width=" + width.ToString() + "&pid=" + portalId.ToString(); } strAltText } //----------------------------------------------------- helper ShowImagesUL(XPLImage[] images, int width, int portalId, string skinPath, string controlPath, PortalModuleBase module) { if (images.IsNotNullOrEmpty()) { DotNetNukeUtils.AddJsIncludeFile(module.Page, ConfigurationController.GetConfigurationModulePath() + "jQueryPlugins/FancyBox/jquery.fancybox-1.3.0.pack.js", "FancyBox"); DotNetNukeUtils.AddStyleSheet(module.Page, ConfigurationController.GetConfigurationModulePath() + "jQueryPlugins/FancyBox/jquery.fancybox-1.3.0.css", "FancyBoxCSS"); //FancyBox module.Page.ClientScript.RegisterStartupScript(module.GetType(), "InitAllImageFancyBox", "$(document).ready(function(){ $(\"a[rel=productimage]\").fancybox({ 'titlePosition' : 'over', 'transitionIn' : 'elastic', 'transitionOut' : 'elastic' }); });", true); } } //----------------------------------------------------- helper ShowRate(XPLProduct product, string ratePrefix) { if (product.myPriceFrom != null && product.myPriceFrom.price > 0) { ratePrefixDecimalUtils.FormatCurrency(product.myPriceFrom.price, product.myPriceFrom.myCurrency.symbol, true)string.Format("{0}", product.myPriceFrom.priceType) } } //----------------------------------------------------- }