Parque Campismo


Exception in template (eCom/Productlist/ProductList.cshtml): System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at CompiledRazorTemplates.Dynamic.adfdfdffbd.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.Output()
@inherits RazorTemplateBase<RazorTemplateModel<Template>> @using System; @using System.Linq; @using System.Data; @using Dynamicweb.Rendering; @{ @* Translates *@ var str_translateKnowMore = "Saber mais"; var str_translateAppleStore = "App Store"; var str_translateGoogleStore = "Google Play Store"; var str_translateWindowsStore = "Windows Store"; var str_translateContacts = "Contactos"; var str_translateGoToLocation = "Ver Localização"; var str_translateOpenWebsiteList = "Abrir website"; var str_translateTemporaryClosed = "Fechado temporáriamente"; var str_translateWalkingToursDistance = "Distância"; var str_translateWalkingToursDifficulty = "Dificuldade"; @* Global variables *@ var str_firstGroup = ""; var str_groupCategory = ""; var str_listItem = ""; var counter = 0; @* Variables used on detail *@ var str_imageSrc = ""; var str_imageSrcParams = ""; var str_imageSrcFinal = ""; var str_productName = ""; var str_productLink = ""; @* Products Loop List *@ if(GetLoop("Products").Count > 0){ <ul class="productList"> @foreach (LoopItem i in GetLoop("Products")){ @* Get first group category and applys to all Loop Itens *@ if (counter == 0) { str_firstGroup = i.GetValue("Ecom:Product.PrimaryOrFirstGroupID").ToString(); var str_sql = "SELECT TOP 1 ProductCategoryID FROM EcomGroups where GroupId='" + str_firstGroup + "'"; var obj_dataSet = Dynamicweb.Database.CreateDataSet(str_sql); str_groupCategory = obj_dataSet.Tables[0].Rows[0]["ProductCategoryID"].ToString(); counter = 1; } str_listItem = "listitem" + (@i.Index % 3); if(str_groupCategory=="MUS"){ str_groupCategory = "HTL MUS"; } if(str_groupCategory=="ICP"){ str_groupCategory = "ICP HTL MUS"; } if(str_groupCategory=="APP"){ str_groupCategory = "apps"; } if(str_groupCategory=="OFF"){ str_groupCategory = "offices"; } <li class="@str_groupCategory @str_listItem"> @switch (str_groupCategory) { case "HTL MUS": str_imageSrc = "/admin/public/getimage.ashx?Image="; str_imageSrcParams = "&amp;altFmImage_path=/Files/Templates/Designs/visitMadeira/images/alternativeImage.jpg&amp;Width=220&amp;Height=180&amp;Compression=90"; str_imageSrcFinal = ""; str_productName = @i.GetString("Ecom:Product.Name"); str_productLink = @i.GetString("Ecom:Product.Link.Clean"); <figure> <a href="@str_productLink" title="@str_productName"> @if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.ImageSmall.Clean"))) { str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageSmall.Clean") + @str_imageSrcParams; }else if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.ImageMedium.Clean"))){ str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageMedium.Clean") + @str_imageSrcParams; }else{ str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageLarge.Clean") + @str_imageSrcParams; } <img src="@str_imageSrcFinal" alt="@str_productName" /> </a> </figure> <h2> <a href="@str_productLink">@str_productName</a> </h2> <div class="columnLeft"> @if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product:Field.scheduleTime.Value.Clean"))){ <div class="openingHours"> <b>@i.GetString("Ecom:Product:Field.scheduleTime.Name"):</b> <br /> @i.GetString("Ecom:Product:Field.scheduleTime.Value.Clean") </div><br /> } @if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product:Field.schedulePause.Value.Clean"))){ <div class="pauseHours"> <b>@i.GetString("Ecom:Product:Field.schedulePause.Name"):</b> <br /> @i.GetString("Ecom:Product:Field.schedulePause.Value.Clean") </div> } <a class="viewMore" href="@str_productLink"> @str_translateKnowMore </a> </div> <div class="columnRight"> <span class="titleContacts"> Contactos </span> @if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.Address.Value.Clean"))){ <div class="musAddress"> @i.GetString("Ecom:Product:Field.Address.Value.Clean") </div> } @if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.Phone.Value.Clean"))){ <div class="phone"> @i.GetString("Ecom:Product:Field.Phone.Value.Clean") </div> } @if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.email.Value.Clean"))){ <a class="email" href="mailto:@i.GetString("Ecom:Product:Field.email.Value.Clean")"> Enviar email </a> } @if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.website.Value.Clean"))) { string str_hrefOpenWebsite = i.GetString("Ecom:Product:Field.website.Value.Clean"); string str_hrefPrefix = "http://"; bool bol_containsPrefix = str_hrefOpenWebsite.Contains(str_hrefPrefix); if (bol_containsPrefix) { <a target="_blank" href="@str_hrefOpenWebsite"> Abrir website </a> } else { <a target="_blank" href="http://@str_hrefOpenWebsite"> Abrir website </a> } } <a class="seeLocation" href="@i.GetString("Ecom:Product.Link.Clean")?goToLocation=1"> @str_translateGoToLocation </a> </div> break; case "HTL": str_imageSrc = "/admin/public/getimage.ashx?Image="; str_imageSrcParams = "&amp;altFmImage_path=/Files/Templates/Designs/visitMadeira/images/alternativeImage.jpg&amp;Width=220&amp;Height=180&amp;Compression=90"; str_imageSrcFinal = ""; str_productName = @i.GetString("Ecom:Product.Name"); str_productLink = @i.GetString("Ecom:Product.Link.Clean"); <figure> <a href="@str_productLink" title="@str_productName"> @if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.ImageSmall.Clean"))) { str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageSmall.Clean") + @str_imageSrcParams; }else if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.ImageMedium.Clean"))){ str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageMedium.Clean") + @str_imageSrcParams; }else{ str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageLarge.Clean") + @str_imageSrcParams; } <img src="@str_imageSrcFinal" alt="@str_productName" /> </a> </figure> <h2> <a href="@str_productLink">@str_productName</a> </h2> <div class="columnLeft"> @if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.CategoryField.HTL.accommodationType.OptionLabel"))) { <span class="hotelType"> @i.GetString("Ecom:Product.CategoryField.HTL.accommodationType.OptionLabel") </span> } @if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.CategoryField.HTL.accommodationStars.OptionLabel"))) { if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.CategoryField.HTL.accommodationStars.Value.Clean"))) { <span class="@i.GetString("Ecom:Product.CategoryField.HTL.accommodationStars.Value.Clean") starsRate"> @i.GetString("Ecom:Product.CategoryField.HTL.accommodationStars.OptionLabel") </span> } } @if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.ShortDescription"))) { <div class="hotelShortDescription"> @i.GetString("Ecom:Product.ShortDescription").Substring(0, 120)... </div> } <a class="viewMore" href="@str_productLink"> @str_translateKnowMore </a> </div> <div class="columnRight"> <span class="titleContacts"> Contactos </span> @if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.Phone.Value.Clean"))){ <div class="phone"> @i.GetString("Ecom:Product:Field.Phone.Value.Clean") </div> } @if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.website.Value.Clean"))){ <div class="website htlWebsite"> <a class="htlWebsite" target="_blank" href="@(i.GetString("Ecom:Product:Field.website.Value.Clean").StartsWith("http") ? i.GetString("Ecom:Product:Field.website.Value.Clean") : "http://"+i.GetString("Ecom:Product:Field.website.Value.Clean"))">@str_translateOpenWebsiteList</a> </div> } <a class="seeLocation" href="@i.GetString("Ecom:Product.Link.Clean")?goToLocation=1"> @str_translateGoToLocation </a> </div> break; case "apps": str_imageSrc = "/admin/public/getimage.ashx?Image="; str_imageSrcParams = "&amp;altFmImage_path=/Files/Templates/Designs/visitMadeira/images/alternativeImage.jpg&amp;Width=220&amp;Height=180&amp;Compression=90"; str_imageSrcFinal = ""; str_productName = @i.GetString("Ecom:Product.Name"); str_productLink = @i.GetString("Ecom:Product.Link.Clean"); <text><figure></text> if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.website.Value.Clean"))) { string str_hrefOpenWebsite = i.GetString("Ecom:Product:Field.website.Value.Clean"); string str_hrefPrefix = "http://"; bool bol_containsPrefix = str_hrefOpenWebsite.Contains(str_hrefPrefix); if (bol_containsPrefix) { @:<a target="_blank" href="@str_hrefOpenWebsite" title="@str_productName"> } else { @:<a target="_blank" href="@str_hrefOpenWebsite" title="@str_productName"> } } if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product.ImageSmall.Clean"))) { str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageSmall.Clean") + @str_imageSrcParams; } else if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.ImageMedium.Clean"))) { str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageMedium.Clean") + @str_imageSrcParams; } else { str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageLarge.Clean") + @str_imageSrcParams; } <img src="@str_imageSrcFinal" alt="@str_productName" /> @: @:</a> @:</figure> <h2> @if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.website.Value.Clean"))) { <a target="_blank" href="@i.GetString("Ecom:Product:Field.website.Value.Clean")">@str_productName</a> }else{ @str_productName } </h2> if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product.CategoryField.APP.Price.Value.Clean"))){ <span class="appDetails"> @i.GetString("Ecom:Product.CategoryField.APP.Price.Value.Clean") </span> } if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product.CategoryField.APP.Author.Value.Clean"))){ <span class="appDetails"> @i.GetString("Ecom:Product.CategoryField.APP.Author.Value.Clean") </span> } if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product.CategoryField.APP.Date.Value.Clean"))){ <span class="appDetails"> @i.GetString("Ecom:Product.CategoryField.APP.Date.Value.Clean") </span> } if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product.ShortDescription"))){ <div class="appDescription"> @i.GetString("Ecom:Product.ShortDescription") </div> } if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product.LongDescription"))){ <div class="appDescription"> @i.GetString("Ecom:Product.LongDescription") </div> } if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product.CategoryField.APP.AppleStore.Value.Clean"))){ <a target="_blank" href="@i.GetString("Ecom:Product.CategoryField.APP.AppleStore.Value.Clean")"> @str_translateAppleStore </a> } if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product.CategoryField.APP.GoogleStore.Value.Clean"))){ <a target="_blank" href="@i.GetString("Ecom:Product.CategoryField.APP.GoogleStore.Value.Clean")"> @str_translateGoogleStore </a> } if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product.CategoryField.APP.WindowsStore.Value.Clean"))){ <a target="_blank" href="@i.GetString("Ecom:Product.CategoryField.APP.WindowsStore.Value.Clean")"> @str_translateWindowsStore </a> } if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.website.Value.Clean"))){ <a target="_blank" href="@i.GetString("Ecom:Product:Field.website.Value.Clean")"> @str_translateKnowMore </a> } break; case "offices": str_imageSrc = "/admin/public/getimage.ashx?Image="; str_imageSrcParams = "&amp;altFmImage_path=/Files/Templates/Designs/visitMadeira/images/alternativeImage.jpg&amp;Width=220&amp;Height=180&amp;Compression=90"; str_imageSrcFinal = ""; str_productName = @i.GetString("Ecom:Product.Name"); str_productLink = @i.GetString("Ecom:Product.Link.Clean"); <figure> <a href="@str_productLink" title="@str_productName"> @if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.ImageSmall.Clean"))) { str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageSmall.Clean") + @str_imageSrcParams; }else if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.ImageMedium.Clean"))){ str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageMedium.Clean") + @str_imageSrcParams; }else{ str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageLarge.Clean") + @str_imageSrcParams; } <img src="@str_imageSrcFinal" alt="@str_productName" /> </a> </figure> <h2> <a href="@str_productLink">@str_productName</a> </h2> if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.Address.Value.Clean"))) { <div class="address"> @i.GetString("Ecom:Product:Field.Address.Value.Clean") </div> } if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.Phone.Value.Clean"))) { <div class="phone"> @i.GetString("Ecom:Product:Field.Phone.Value.Clean") </div> } if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product:Field.scheduleTime.Value.Clean"))) { <div class="scheduleTime"> @i.GetString("Ecom:Product:Field.scheduleTime.Value.Clean") </div><br /> } <a class="marginTop readMoreButton" href="@str_productLink"> @str_translateKnowMore </a> break; case "ICP HTL MUS": str_imageSrc = "/admin/public/getimage.ashx?Image="; str_imageSrcParams = "&amp;altFmImage_path=/Files/Templates/Designs/visitMadeira/images/alternativeImage.jpg&amp;Width=220&amp;Height=180&amp;Compression=90"; str_imageSrcFinal = ""; str_productName = @i.GetString("Ecom:Product.Name"); str_productLink = @i.GetString("Ecom:Product.Link.Clean"); <figure> <a href="@str_productLink" title="@str_productName"> @if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.ImageSmall.Clean"))) { str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageSmall.Clean") + @str_imageSrcParams; }else if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.ImageMedium.Clean"))){ str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageMedium.Clean") + @str_imageSrcParams; }else{ str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageLarge.Clean") + @str_imageSrcParams; } <img src="@str_imageSrcFinal" alt="@str_productName" /> </a> </figure> <h2> <a href="@str_productLink">@str_productName</a> </h2> <div class="columnLeft"> @if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product:Field.scheduleTime.Value.Clean"))){ <div class="openingHours"> <b>@i.GetString("Ecom:Product:Field.scheduleTime.Name"):</b> <br /> @i.GetString("Ecom:Product:Field.scheduleTime.Value.Clean") </div><br /> } @if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product:Field.schedulePause.Value.Clean"))){ <div class="pauseHours"> <b>@i.GetString("Ecom:Product:Field.schedulePause.Name"):</b> <br /> @i.GetString("Ecom:Product:Field.schedulePause.Value.Clean") </div> } <a class="viewMore" href="@str_productLink"> @str_translateKnowMore </a> </div> <div class="columnRight"> <span class="titleContacts"> Contactos </span> @if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.Address.Value.Clean"))){ <div class="musAddress"> @i.GetString("Ecom:Product:Field.Address.Value.Clean") </div> } @if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.Phone.Value.Clean"))){ <div class="phone"> @i.GetString("Ecom:Product:Field.Phone.Value.Clean") </div> } @if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.email.Value.Clean"))){ <a class="email" href="mailto:@i.GetString("Ecom:Product:Field.email.Value.Clean")"> Enviar email </a> } @if (!string.IsNullOrWhiteSpace(i.GetString("Ecom:Product:Field.website.Value.Clean"))) { string str_hrefOpenWebsite = i.GetString("Ecom:Product:Field.website.Value.Clean"); string str_hrefPrefix = "http://"; bool bol_containsPrefix = str_hrefOpenWebsite.Contains(str_hrefPrefix); if (bol_containsPrefix) { <a target="_blank" href="@str_hrefOpenWebsite"> Abrir website </a> } else { <a target="_blank" href="http://@str_hrefOpenWebsite"> Abrir website </a> } } <a class="seeLocation" href="@i.GetString("Ecom:Product.Link.Clean")?goToLocation=1"> @str_translateGoToLocation </a> </div> break; default: str_imageSrc = "/admin/public/getimage.ashx?Image="; str_imageSrcParams = "&amp;altFmImage_path=/Files/Templates/Designs/visitMadeira/images/alternativeImage.jpg&amp;Width=220&amp;Height=180&amp;Compression=90"; str_imageSrcFinal = ""; str_productName = @i.GetString("Ecom:Product.Name"); str_productLink = @i.GetString("Ecom:Product.Link.Clean"); <figure> <a href="@str_productLink" title="@str_productName"> @if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.ImageSmall.Clean"))) { str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageSmall.Clean") + @str_imageSrcParams; }else if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.ImageMedium.Clean"))){ str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageMedium.Clean") + @str_imageSrcParams; }else{ str_imageSrcFinal = @str_imageSrc + @i.GetValue("Ecom:Product.ImageLarge.Clean") + @str_imageSrcParams; } <img src="@str_imageSrcFinal" alt="@str_productName" /> </a> </figure> <h2> <a href="@str_productLink">@str_productName</a> </h2> if(@str_groupCategory=="ACT" && @i.GetString("Ecom:Product.CategoryField."+str_groupCategory+".ActivityType.Value.Clean") == "walkingTours"){ if (@i.GetString("Ecom:Product.CategoryField.ACT.Encerrado.Value")=="True"){ <span class="temporaryClosed"> @str_translateTemporaryClosed </span> } if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.CategoryField.ACT.Distance.Value"))){ <span class="walkingToursInfo"> @str_translateWalkingToursDistance: @i.GetValue("Ecom:Product.CategoryField.ACT.Distance.Value") </span> } if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.CategoryField.ACT.Difficulty.Value"))){ <span class="walkingToursInfo"> @str_translateWalkingToursDifficulty: @i.GetValue("Ecom:Product.CategoryField.ACT.Difficulty.OptionLabel") </span> } } if (!string.IsNullOrWhiteSpace(@i.GetString("Ecom:Product.ShortDescription"))){ <div class="shortDescription"> @i.GetValue("Ecom:Product.ShortDescription") </div> } <a class="marginTop readMoreButton" href="@str_productLink"> @str_translateKnowMore </a> break; } </li> } </ul> <!--@SnippetStart(jsOnLoad)--><text>onLoadProductList();</text><!--@SnippetEnd(jsOnLoad)--> if(str_groupCategory=="ACT"){ <a id="backBtn" href="javascript:window.history.back();">Voltar atrás</a> } } if(Convert.ToInt32(@GetValue("Ecom:ProductList.TotalPages")) > 1){ <div id="productListNavigation"> @if (!string.IsNullOrWhiteSpace(GetString("Ecom:ProductList.PrevPage.Clean"))) { <a id="prevpage" href="@GetValue("Ecom:ProductList.PrevPage.Clean")"> < Anterior </a> } @if(GetLoop("Ecom:ProductList.Pages5").Count > 0){ foreach (LoopItem i in GetLoop("Ecom:ProductList.Pages5")) { string str_class = ""; if (i.GetBoolean("Ecom:ProductList.Pages5.Page.IsCurrent")) { str_class = "class='activeItem'"; } <a href="@i.GetValue("Ecom:ProductList.Pages5.Page.UrlHtmlEncoded")" @str_class>@i.GetValue("Ecom:ProductList.Pages5.Page.Number")</a> } } @if(GetValue("Ecom:ProductList.NextPage.Clean").ToString()!=""){ <a id="nextpage" href="@GetValue("Ecom:ProductList.NextPage.Clean")"> Próxima > </a> } </div> } }

Encontrar ...

By Location

Mapa Região Autónoma da Madeira Santana Santana São Vicente São Vicente Porto Moniz Porto Moniz Calheta Calheta Ponta do Sol Ponta do Sol Ribeira Brava Ribeira Brava Câmara de Lobos Câmara de Lobos Funchal Funchal Santa Cruz Santa Cruz Machico Machico Porto Santo Porto Santo

By Keyword

submeter

By Category

Remover Filtros
Partilhar

Subscreva a nossa Newsletter

If you want to receive our news and useful informations, please subscribe our newsleter.
Subscrever

Virtual Visit Photos 360º

virtual.visitmadeira.pt
Visit Now >

Facebook Fan Page

Youtube Flicker RSS ISSUU
Award Madeira Islands SRT Região Madeira