Timrå

Error parsing template "Designs/Swift/Paragraph/Rental_Customercenter.cshtml"
Line 32: (31:39) - Unterminated string literal. Strings that start with a quotation mark (") must be terminated before the end of the line.  However, strings that start with @ and a quotation mark (@") can span multiple lines. Closing HTML tags within a string literal may trigger this error message.

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Dynamicweb.Environment 3 4 @{ 5 var openingHours = ""; 6 var email = ""; 7 var phone = ""; 8 var address = ""; 9 var zip = ""; 10 var city = ""; 11 double geoLat = 0; 12 double geoLong = 0; 13 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/"; 14 string apiKey = !string.IsNullOrEmpty(Pageview.AreaSettings.GetString("Google_APIKey")) ? Pageview.AreaSettings.GetString("Google_APIKey") : ""; 15 if (!string.IsNullOrEmpty(Dynamicweb.Context.Current.Request["userId"])) 16 { 17 var userId = System.Net.WebUtility.HtmlEncode(Dynamicweb.Context.Current.Request["userId"]); 18 var kc = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(userId)); 19 if (kc != null) 20 { 21 var item = Dynamicweb.Content.Items.Item.GetItemById(kc.ItemType, kc.ItemId); 22 23 openingHours = item["Opening_Hours"].ToString(); 24 email = kc.Email; 25 phone = kc.Phone; 26 address = kc.Address; 27 zip = kc.Zip; 28 city = kc.City; 29 geoLat = kc.GeolocationLatitude; 30 geoLong = kc.GeolocationLongitude; 31 32 Pageview.Page.MetaTitle = $"Kontakta oss | {kc.Name}; 33 } 34 } 35 36 var isMobile = Dynamicweb.Frontend.Devices.DeviceType.Mobile; 37 } 38 39 <div class="grid grid-1 grid-lg-3 gap-standard @(Pageview.Device != isMobile ? "border-top" : null)"> 40 <div class="g-col order-first order-lg-0 pt-d-24" data-col-size="4" style="--bs-columns:12"> 41 <div class="h-100 p-0 item_swift_sectionheader"> 42 <div id="11589" class="user-select-none" style="scroll-margin-top:var(--header-height,150px)"></div> 43 <h2 class="h2 text-inherit opacity-100 mw-75ch d-inline-block m-0">Kundcenter kontaktuppgifter</h2> 44 </div> 45 </div> 46 <div class="g-col g-col-lg-2 pt-d-24" data-col-size="8" style="--bs-columns:12"> 47 <div class="d-flex align-items-center text-start h-100 item_swift_app"> 48 <div id="11586" class="user-select-none" style="scroll-margin-top:var(--header-height,150px)"></div> 49 <div class="none w-100"> 50 <div class="row row-cols-lg-2 justify-content-between"> 51 <div class="col-lg-8 col-12"> 52 <div class="border-bottom py-15 @(Pageview.Device != isMobile ? "d-flex" : null)"> 53 <p class="col-6 col-lg-6 m-0 @(Pageview.Device == isMobile ? "paragraph-small" : "paragraph-large")">@Translate("Öppettider")</p> 54 <p class="paragraph-large col-lg-6 m-0">@openingHours</p> 55 </div> 56 <div class="border-bottom py-15 @(Pageview.Device != isMobile ? "d-flex" : null)"> 57 <p class="col-6 col-lg-6 m-0 @(Pageview.Device == isMobile ? "paragraph-small" : "paragraph-large")">@Translate("E-post")</p> 58 <a href="mailto:@email" class="paragraph-large text_link_blue col-lg-6">@email</a> 59 </div> 60 <div class="border-bottom py-15 @(Pageview.Device != isMobile ? "d-flex" : null)"> 61 <p class="col-6 col-lg-6 m-0 @(Pageview.Device == isMobile ? "paragraph-small" : "paragraph-large")">@Translate("Telefon")</p> 62 <a href="tel:@phone" class="paragraph-large text_link_blue col-lg-6">@phone</a> 63 </div> 64 <div class="border-bottom py-15 @(Pageview.Device != isMobile ? "d-flex" : null)"> 65 <p class="col-6 col-lg-6 m-0 @(Pageview.Device == isMobile ? "paragraph-small" : "paragraph-large")">@Translate("Besöksadress")</p> 66 <a href="https://www.google.com/maps/dir//Skanska+Rental,+@address,+@zip+@city" target="_blank" class="paragraph-large text_link_blue col-lg-6">@address, @zip @city</a> 67 </div> 68 <a href="https://www.google.com/maps/dir//Skanska+Rental,+@address,+@zip+@city" target="_blank" class="btn btn_link_primary mt-30 mb-d-48 mb-m-30">@Translate("GetDirections", "Få vägbeskrivning")</a> 69 70 <div class="js-map-column"> 71 <div class="rentalmap rentalmap-small" id="Map"></div> 72 <div class="container" id="rentalMapList"> 73 </div> 74 </div> 75 </div> 76 </div> 77 </div> 78 </div> 79 </div> 80 </div> 81 <script type="module"> 82 var mapIcon = { 83 url: "@(iconPath)marker.svg" 84 } 85 var mapStyle = [ 86 { elementType: 'geometry', stylers: [{ color: '#f5f5f5' }] }, 87 { elementType: 'labels.icon', stylers: [{ visibility: 'off' }] }, 88 { elementType: 'labels.text.fill', stylers: [{ color: '#616161' }] }, 89 { elementType: 'labels.text.stroke', stylers: [{ color: '#f5f5f5' }] }, 90 { 91 featureType: 'administrative.land_parcel', 92 elementType: 'labels.text.fill', 93 stylers: [{ color: '#bdbdbd' }] 94 }, 95 { 96 featureType: 'poi', 97 elementType: 'geometry', 98 stylers: [{ color: '#eeeeee' }] 99 }, 100 { 101 featureType: 'poi', 102 elementType: 'labels.text.fill', 103 stylers: [{ color: '#757575' }] 104 }, 105 { 106 featureType: 'poi.park', 107 elementType: 'geometry', 108 stylers: [{ color: '#e5e5e5' }] 109 }, 110 { 111 featureType: 'poi.park', 112 elementType: 'labels.text.fill', 113 stylers: [{ color: '#9e9e9e' }] 114 }, 115 { 116 featureType: 'road', 117 elementType: 'geometry', 118 stylers: [{ color: '#ffffff' }] 119 }, 120 { 121 featureType: 'road.arterial', 122 elementType: 'labels.text.fill', 123 stylers: [{ color: '#757575' }] 124 }, 125 { 126 featureType: 'road.highway', 127 elementType: 'geometry', 128 stylers: [{ color: '#dadada' }] 129 }, 130 { 131 featureType: 'road.highway', 132 elementType: 'labels.text.fill', 133 stylers: [{ color: '#616161' }] 134 }, 135 { 136 featureType: 'road.local', 137 elementType: 'labels.text.fill', 138 stylers: [{ color: '#9e9e9e' }] 139 }, 140 { 141 featureType: 'transit.line', 142 elementType: 'geometry', 143 stylers: [{ color: '#e5e5e5' }] 144 }, 145 { 146 featureType: 'transit.station', 147 elementType: 'geometry', 148 stylers: [{ color: '#eeeeee' }] 149 }, 150 { 151 featureType: 'water', 152 elementType: 'geometry', 153 stylers: [{ color: '#c9c9c9' }] 154 }, 155 { 156 featureType: 'water', 157 elementType: 'labels.text.fill', 158 stylers: [{ color: '#9e9e9e' }] 159 } 160 ]; 161162 var locations = [ 163 { 164 location: { 165 lat: @(geoLat.ToString().Replace(",", ".")), 166 lng: @(geoLong.ToString().Replace(",", ".")) 167 } 168 }, 169 ]; 170171 var mapSettings = { 172 locations: locations, 173 mapStyle: mapStyle, 174 mapIcon: mapIcon, 175 initialZoomLevel: 6, 176 defaultLat: @geoLat.ToString().Replace(",", "."), 177 defaultLng: @geoLong.ToString().Replace(",", "."), 178 regionCode: "SE", 179 directionsLabel: "@Translate("Directions")", 180 noLocationsFoundLabel: "@Translate("No options available in the selected area")" 181 }; 182183 window.addEventListener('DOMContentLoaded', function (event) { 184 rental.RentalLocationsMap.init(mapSettings); 185 }); 186187 </script> 188 <script defer src="https://maps.googleapis.com/maps/api/js?key=@(apiKey)"></script> 189

Kontakta vår säljare

profile picture

Anders Renberg

Försäljningschef

010-449 52 40

profile picture

Simon Renberg

Säljare

076 307 80 45

Vi som jobbar här

profile picture

Dan Bergkvist

Kundcenterchef

010-448 64 08

profile picture

William Renberg

Innesäljare

010-449 62 18

profile picture

Johan Melin

Innesäljare

010-448 42 13

profile picture

Robert Andersson

Innesäljare/Service

010-448 64 33

X

Logga in

Logga in

Logga in

Mina listor

Nytt projekt

Lägg upp ett nytt projektnummer hos Rental

Använd det här formuläret när du vill lägga upp ett nytt projektnummer hos Rental. Syftet med formuläret är att förenkla för er och oss att lägga upp nya projekt/projektnummer. Du kan också lägga till fler användare här som ska ha inlologgning till det nya projektet. Vi återkopplar till dig som står som ansvarig när projektet är upplagt. Inloggningsuppgifter skickas till de användare du anger i beställningen.

Har du frågor är du välkommen att kontakta oss via kundsupport@rental.se

Ja

Tack för din projektanmälan!

Vi återkopplar inom kort.

Något gick fel, var god kontakta support!