Commercial real estate news releases from Avison Young

Quarterly and topical research insights to help your business gain competitive edge in commercial real estate.

Une erreur s'est produite lors du traitement du gabarit.
?substring(...) expects a number as argument #1, but received a Null.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign yturl2 = yturl?substring(index)  [in template "20302#20342#NEWS_RELEASE_DETAIL" at line 123, column 13]
----
1<#assign _dlfels = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") /> 
2<#-- set the default image and alt text --> 
3<#assign imgSrc = Image.getData() > 
4<#assign imgAltText = Content.getData() > 
5<#-- sets Alternate image --> 
6<#assign imgSrc2 = Alternate_Hero_Image.getData() > 
7<#assign imgAltText2 = Content.getData() > 
8 
9<#-- try to set more advanced options of image display --> 
10<#-- set the base hostname url for environment (local/qa/stg/prod) --> 
11<#assign imageBaseUri = ui_config.getCdnCgiUri() > 
12<#-- determine if we want to use CDN Image Optimizations or not --> 
13<#if ui_config.getUseCdnImageOptimizations() > 
14<#-- set the instructions to use for optimizing the image(s) in this item --> 
15    <#assign instructionPath = "/cdn-cgi/image/q=50" > 
16    <#if !getterUtil.getBoolean(By_pass_Cloudflare_optimization.getData())> 
17        <#assign imageBaseUri = imageBaseUri + instructionPath > 
18    </#if> 
19</#if> 
20<#assign treePath = group_util.getGroupFriendlyUrlTreePath(groupId) > 
21 
22<#assign image_attributes = jsonFactoryUtil.createJSONObject(Image.getAttributes()) > 
23<#if (image_attributes.fileEntryId??) > 
24    <#assign fileEntryId = image_attributes.fileEntryId?number > 
25    <#if fileEntryId??> 
26        <#assign fe = _dlfels.getFileEntry(fileEntryId)> 
27        <#if fe??> 
28            <#assign imgSrc = imageBaseUri + "/documents/" + fe.repositoryId +"/"  + fe.fileEntryId + "/" + fe.fileName + "/" + fe.uuid + "?t=" + fe.modifiedDate?long > 
29            <#if image_attributes.alt?has_content> 
30                <#assign imgAltText = image_attributes.alt > 
31            <#else> 
32                <#assign imgAltText = imgAltText?replace('<[^>]+>','','r') > 
33            </#if> 
34        </#if> 
35    </#if> 
36</#if> 
37 
38<#assign image_attributes2 = jsonFactoryUtil.createJSONObject(Alternate_Hero_Image.getAttributes()) > 
39<#if (image_attributes2.fileEntryId??) > 
40    <#assign fileEntryId2 = image_attributes2.fileEntryId?number > 
41    <#if fileEntryId2??> 
42        <#assign fe = _dlfels.getFileEntry(fileEntryId2)> 
43        <#if fe??> 
44            <#assign imgSrc2 = imageBaseUri + "/documents/" + fe.repositoryId +"/"  + fe.fileEntryId + "/" + fe.fileName + "/" + fe.uuid + "?t=" + fe.modifiedDate?long > 
45            <#if image_attributes2.alt?has_content> 
46                <#assign imgAltText2 = image_attributes2.alt > 
47            <#else> 
48                <#assign imgAltText2 = imgAltText2?replace('<[^>]+>','','r') > 
49            </#if> 
50        </#if> 
51    </#if> 
52</#if> 
53 
54<style> 
55    /*displays bios on one row if there's room */ 
56    #ay .ay-news-release__content .contact-group { 
57        display:flex; 
58        flex-justify:start; 
59        flex-wrap:wrap; 
60
61    /*Keeps the ay-bio from smooshing width-wise.*/ 
62    #ay .ay-news-release__content .ay-bio { 
63        min-width:240px; 
64
65    /* added the white on hover because the primary button is supposed to have white text, but it has light blue so the text disappears on hover. */ 
66    #ay .ay-button__primary:hover { 
67        color:#FFF; 
68
69</style> 
70 
71<#assign displayDate = .vars['reserved-article-display-date'].data> 
72<#setting time_zone = languageUtil.get(locale, "template-timezone")> 
73<#assign originalLocale = locale> 
74<#setting locale = localeUtil.getDefault()> 
75<#assign displayDate = displayDate?date("EEE, d MMM yyyy HH:mm:ss Z")> 
76<#setting locale = originalLocale> 
77<#assign displayDate = displayDate?string("long")> 
78 
79<div class="ay-news-release"> 
80    <h1 id="ay-artTitle" class="h2">${Content.getData()}</h1> 
81    <#if validator.isNotNull(Youtube_Video_Hero_.getData()) > 
82        <#assign yturl = Youtube_Video_Hero_.getData()> 
83    <#else> 
84        <#assign yturl = ''> 
85    </#if> 
86    <#if Image.getData()?has_content && !yturl?has_content > 
87        <#if Hide_hero_image_on_detail_page.getData()?has_content> 
88        <#-- if var doesn't exist or equals false '0'--> 
89            <#if !Alternate_Hero_Image.getData()?has_content> 
90                <#if getterUtil.getBoolean(By_pass_Cloudflare_optimization.getData())> 
91                    <img src="${Image.getData()}" alt="${imgAltText}"> 
92                <#else> 
93                    <img src="${imgSrc}" alt="${imgAltText}"> 
94                </#if> 
95            <#else> 
96                <#if getterUtil.getBoolean(By_pass_Cloudflare_optimization.getData())> 
97                    <img src="${Alternate_Hero_Image.getData()}" alt="${imgAltText}" style="max-height: none;"> 
98                <#else> 
99                    <img src="${imgSrc2}" alt="${imgAltText2}" style="max-height: none;"> 
100                </#if> 
101            </#if> 
102        </#if> 
103    </#if> 
104    <#if validator.isNotNull(Youtube_Video_Hero_.getData()) > 
105        <#assign isVimeo = "false"> 
106        <#assign yturl = Youtube_Video_Hero_.getData()> 
107        <#if yturl?contains("https://youtu.be/")> 
108            <#assign index = yturl?index_of('https://youtu.be/')> 
109            <#assign index = index + 17> 
110        </#if> 
111        <#if yturl?contains("https://www.youtube.com/watch?v=")> 
112            <#assign index = yturl?index_of('https://www.youtube.com/watch?v=')> 
113            <#assign index = index + 32> 
114        </#if> 
115 
116        <#if yturl?contains("https://vimeo.com/")> 
117            <#assign isVimeo = "true"> 
118            <#assign index = yturl?remove_beginning("https://vimeo.com/")> 
119            <#assign videoEmbedCode = "https://player.vimeo.com/video/" + index> 
120            <#assign yturl2 = videoEmbedCode> 
121            <#assign linkURL = yturl> 
122        <#else> 
123            <#assign yturl2 = yturl?substring(index)> 
124            <#assign linkURL = "https://www.youtube.com/embed/${yturl2}?rel=0&amp;showinfo=0&amp;autoplay=1"> 
125        </#if> 
126 
127        <div class="ay-video-firefox-extra-wrap"> 
128            <div class="ay-video-wrapper"> 
129                <#if Image.getData()?has_content> 
130                    <a href="${linkURL}" target="youtubevideo" style="background:url('${Image.getData()}') no-repeat center center; background-size:cover;"></a> 
131                </#if> 
132                <div class="<#if isVimeo == 'true'>ytv-container<#else>yt-container ytv-container</#if>" video="${yturl2}"> 
133                    <#if isVimeo == "true"> 
134                        <iframe id="youtubeiframe" name="youtubevideo" width="1280" height="720" src="${videoEmbedCode}" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe> 
135                    </#if> 
136                </div> 
137                <#if isVimeo == "true"> 
138                    <script src="https://player.vimeo.com/api/player.js"></script> 
139                    <script>const player = new Vimeo.Player("youtubeiframe");</script> 
140                </#if> 
141                <script> 
142                    $(document).ready(function(){ 
143                        $(".ay-video-wrapper a").bind("click",function(event){ 
144                            <#if isVimeo == "true"> 
145                            event.preventDefault(); 
146                            $(this).next().children().css({visibility:'visible'}); 
147                            player.play(); 
148                            <#else> 
149                            $(this).next().children().css({visibility:'visible'}); 
150                            </#if> 
151                            if($(".cc-window").hasClass("cc-invisible") == true){ 
152                                if($(".yt-container").html() != ""){ 
153                                    $(this).css({display:'none'}); 
154                                    <#if isVimeo == "false"> 
155                                    $(this).next().children().css({visibility:'visible'}).click(); 
156                                    </#if> 
157
158                            }else{ 
159                                event.preventDefault(); 
160
161                        }); 
162                    }); 
163                </script> 
164            </div> 
165        </div> 
166    </#if> 
167 
168    <small>${displayDate}</small> 
169    <div class="ay-news-release__content"> 
170        <#if SubTitle.getData()?has_content> 
171            <h3 class="ay-news-release__subtitle">${SubTitle.getData()}</h3> 
172        </#if> 
173        ${News_Release_Detail_Content.getData()} 
174        <#if Boiler_Plate_Content.getData()?has_content > 
175            <div class="ay-news-release__boiler"> 
176                ${Boiler_Plate_Content.getData()} 
177            </div> 
178        </#if> 
179        <div class="ay-news-release__social"> 
180            <a id="ay-email-to" href="#" target="_blank" class="ay-news-release__social--item"> 
181                <svg class="ay-news-release__social--icon"> 
182                    <use xlink:href="/o/ay-theme/resources/images/images.svg#email" /> 
183                </svg> 
184            </a> 
185            <a id="ay-social-twitter" href="#" class="ay-news-release__social--item" target="_blank"> 
186                <svg class="ay-news-release__social--icon" xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 150 150" style="enable-background:new 0 0 150 150;"> 
187  <defs> 
188    <style> 
189      .cls-1 { 
190        fill: #000; 
191        stroke-width: 0px; 
192
193    </style> 
194  </defs> 
195  <path fill="#000" class="cls-1" d="m85.89,109.23h22.79l-25.62-41.4,19.49-25.09h0l4.68-6h-8.9l-19.21,24.74-15.03-24.27h-22.79l25.12,40.59-24.05,30.97h8.9l4.68-6h0l14.46-18.58,15.53,25.09-.06-.03Zm-25.15-66.02l37.16,60.01h-8.65l-37.16-60.01s8.65,0,8.65,0Zm89.26,31.78c0,41.42-33.58,75-75,75S0,116.42,0,75,33.58,0,75,0s75,33.58,75,75Z"/> 
196</svg> 
197            </a> 
198            <a id="ay-social-facebook" href="#" class="ay-news-release__social--item" target="_blank"> 
199                <svg class="ay-news-release__social--icon"> 
200                    <use xlink:href="/o/ay-theme/resources/images/images.svg#facebook" /> 
201                </svg> 
202            </a> 
203            <a id="ay-social-linkedin" href="#" class="ay-news-release__social--item" target="_blank"> 
204                <svg class="ay-news-release__social--icon"> 
205                    <use xlink:href="/o/ay-theme/resources/images/images.svg#linkedin1" /> 
206                </svg> 
207            </a> 
208            <#if treePath?contains("/ay/de/") > 
209                <a id="ay-social-xming" href="#" class="ay-news-release__social--item" target="_blank"> 
210                    <svg class="ay-news-release__social--icon"> 
211                        <use xlink:href="/o/ay-theme/resources/images/images.svg#xing-social" /> 
212                    </svg> 
213                </a> 
214            </#if> 
215        </div> 
216    </div> 
217</div> 
218<#assign newsTitle = Content.getData() /> 
219 
220<script> 
221    function socialLinks(){ 
222        uri=window.location; 
223        uri=uri.toString(); 
224        ofLoc=$(".ay-header-options h3 a").html(); 
225        enc=encodeURIComponent(uri); 
226        prtitle=$("#ay-artTitle").html(); 
227        //prtitle=prtitle.replace(/(\r\n\t|\n|\r\t)/gm,""); 
228        prtitle=encodeURI(prtitle); 
229        mailtoSub="Avison Young - "+ofLoc+" News: "; 
230        mailtoSub=encodeURI(mailtoSub); 
231        //alert(enc); 
232        $("#ay-social-twitter").attr("href","https://twitter.com/intent/tweet?url="+enc+"&amp;text="+prtitle+"&amp;via=AvisonYoung"); 
233        $("#ay-social-facebook").attr("href","https://www.facebook.com/sharer/sharer.php?u="+enc); 
234        $("#ay-social-linkedin").attr("href","https://www.linkedin.com/cws/share?url="+enc); 
235        <#if treePath?contains("/ay/de/") > 
236        $("#ay-social-xming").attr("href","https://www.xing.com/spi/shares/new?url="+enc); 
237        </#if> 
238        $("#ay-email-to").attr("href","mailto:?subject="+mailtoSub+prtitle+"&body="+enc); 
239
240    $(document).ready(function(){ 
241        socialLinks(); 
242    }) 
243</script> 
244 
245<style> 
246    .ay-news-release__content{ 
247        min-height:150px; 
248
249</style>