Pular para o conteúdo

Publicador de conteúdo Publicador de conteúdo

Retornar para página inteira
Voltar

Fale Cidadão - caixa

Um erro ocorreu enquanto processava o modelo.
Error on line 27, column 1 in 20154#20194#194368
JournalArticleLocalService.getArticle( groupId, radio_id ) is undefined.
It cannot be assigned to journalArticleRadio
1<#assign hat = (.vars['hat'].getData()?trim)!"" > 
2<#assign front_title = (.vars['front_title'].getData()?trim)!"" > 
3<#assign sub_title = (.vars['sub_title'].getData()?trim)!"" > 
4<#assign image = (.vars['image'].getData()?trim)!"" > 
5<#assign source = (.vars['source'].getData()?trim)!"" > 
6<#assign author = (.vars['author'].getData()?trim)!"" > 
7<#assign full_text = (.vars['full_text'].getData()?trim)!"" > 
8<#assign radio_id = (.vars['radio_id'].getData()?trim)!"" > 
9<#assign video_url = (.vars['video_url'].getData()?trim)!"" > 
10<#assign gallery_id = (.vars['gallery_id'].getData()?trim)!"" > 
11 
12<#setting datetime_format="dd 'de' MMMM 'de' yyyy 'às' HH:mm"> 
13 
14<#assign theme_img_path = "/mt-portal-theme/images" > 
15 
16<#assign mostrar_radio = "" > 
17<#assign mostrar_video = "" > 
18<#assign mostrar_galeria = "" > 
19<#assign mostrar_audio = "" > 
20 
21<#assign total_img = 0 > 
22 
23<#assign articleId = .vars['reserved-article-id'].data > 
24 
25<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService")> 
26<#assign journalArticle = JournalArticleLocalService.getArticle( groupId, articleId ) > 
27<#assign journalArticleRadio = JournalArticleLocalService.getArticle( groupId, radio_id ) > 
28<#assign journalArticleGaleria = JournalArticleLocalService.getArticle( groupId, gallery_id ) > 
29 
30<#assign createDate = journalArticle["displayDate"]?datetime > 
31 
32 
33<#if radio_id != "" > 
34	<#assign documentRadio = saxReaderUtil.read(journalArticleRadio.getContent()) > 
35 
36	<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='radio_url']") > 
37	<#assign radio_url = (xPathSelector.selectSingleNode(documentRadio.getRootElement()).getStringValue())!"" > 
38	<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='image']") > 
39	<#assign radio_img = (xPathSelector.selectSingleNode(documentRadio.getRootElement()).getStringValue())!"" > 
40	 
41	<#if radio_url != "" > 
42		<#assign radioTitulo = journalArticleRadio.getTitle(locale) > 
43		<#assign radioUrlTitle = journalArticleRadio["urlTitle"] > 
44		<#assign radioUserName = journalArticleRadio["userName"] > 
45		 
46		<#assign mostrar_radio = '<div class="row-fluid"><div class="span5"><div style="background:url(${radio_img});background-size:cover;width:100%;height:220px;"></div></div><div class="span7" style="padding:20px 0;"><span><a href="/web/guest/-/${radioUrlTitle}"><h3>${radioTitulo}</h3></a></span><small>Autor: ${radioUserName}</small><audio controls style="width:90%;opacity:.4;"><source src="${radio_url}" type="audio/mpeg"> Seu navegador não possui suporte para reprodução de áudio.</audio></div></div>' > 
47	</#if> 
48</#if> 
49 
50 
51<#if gallery_id != "" > 
52	<#assign documentGaleria = saxReaderUtil.read(journalArticleGaleria.getContent()) > 
53	<#assign rootElementGaleria = documentGaleria.getRootElement() > 
54 
55	<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='image']") > 
56	<#assign imageGaleria = (xPathSelector.selectSingleNode(documentGaleria.getRootElement()).getStringValue())!"" > 
57	<#assign total_img = xPathSelector.selectNodes(rootElementGaleria)?size > 
58 
59	<#if total_img != 0 > 
60		<#assign total_img = total_img - 1  /> 
61		 
62		<#list 0..total_img as posicao > 
63			<#assign xPathSelector = saxReaderUtil.createXPath('dynamic-element[@name="image"][@index="${posicao}"]/dynamic-content') /> 
64			<#assign img_url = xPathSelector.selectSingleNode(rootElementGaleria).getStringValue() /> 
65			 
66			<!--<img src="${img_url}" /><br>--> 
67 
68		</#list> 
69	</#if> 
70</#if> 
71 
72 
73<#if video_url != "" > 
74	<#assign video_url = video_url?split("/")[3] > 
75	 
76	<#assign mostrar_video = '<object width="100%" height="360" class="hidden-phone"><param name="movie" value="https://www.youtube.com/embed/${video_url}?version=3&theme=light"></param><param name="allowScriptAccess" value="always"></param><embed src="https://www.youtube.com/embed/${video_url}?version=3&theme=light" allowscriptaccess="always" width="100%" height="360"></embed></object><object width="100%" height="240" class="visible-phone"><param name="movie" value="https://www.youtube.com/embed/${video_url}?version=3&theme=light"></param><param name="allowScriptAccess" value="always"></param><embed src="https://www.youtube.com/embed/${video_url}?version=3&theme=light" allowscriptaccess="always" width="100%" height="240"></embed></object>' > 
77</#if> 
78 
79 
80<#if .vars['titulo_do_audio'].getSiblings()?has_content> 
81	<#list .vars['titulo_do_audio'].getSiblings() as cur_item> 
82		<#assign audio_titulo = cur_item.getData() > 
83		<#assign audio_arquivo = cur_item.audio.getData() > 
84		 
85		<#assign mostrar_audio = mostrar_audio + "<div class='row-fluid'><div class='span2'></div><div class='span8' style='padding:20px 0;'><span><h3> ${audio_titulo}</h3></span><audio controls style='width:90%;opacity:.4;'><source src='${audio_arquivo}' type='audio/mpeg'> Seu navegador não possui suporte para reprodução de áudio.</audio></div></div>" > 
86	</#list> 
87</#if> 
88 
89<#assign conteudo = full_text > 
90<#assign conteudo = conteudo?replace("[[radio]]", mostrar_radio) > 
91<#assign conteudo = conteudo?replace("[[audio]]", mostrar_audio) > 
92<#assign conteudo = conteudo?replace("[[video]]", mostrar_video) > 
93<#assign conteudo = conteudo?replace("[[galeria]]", mostrar_galeria) > 
94 
95 
96<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> 
97<style> 
98.main-img{width:100%;padding:30px 0;margin:30px 0;} 
99cite{font-size:24px;font-weight:bold;} 
100cite:before{content: '"';font-size: 48px;font-style: italic;vertical-align: text-bottom;padding-right: 5px;} 
101cite:after{content: '"';font-size: 48px;font-style: italic;display: -webkit-inline-box;-webkit-transform: matrix(-1, 0, 0, -1, 0, 0);margin-left: 5px;} 
102person{display: block;text-align: center;font-size: 12px;} 
103p.left{float:left;width:30%;padding:20px 10px 20px 0;text-align:left;} 
104p.right{float:right;width:30%;padding:20px 0 20px 10px;text-align:right;} 
105.insert-video{margin:20px 0;} 
106.insert-radio{padding: 0;min-height: 100px;background: #F0F5F8;margin: 20px 0;} 
107.insert-radio a h3{font-family:'Nexa';color:#324688;margin: 0;line-height:30px;} 
108.insert-radio small{font-size:12px;color:#324688;display:block;margin-bottom:10px;} 
109.taglib-header:after {content: "${createDate}";font-size: 12px;float:right;margin-bottom: 30px;} 
110.sub-title{font-weight:bold;font-size:18px;} 
111</style> 
112 
113<span class="sub-title">${sub_title}</span> 
114<#if image != "" > 
115	<div class="main-img"><img src="${image}" /></div> 
116</#if> 
117<div style="text-align: justify;margin-top:30px;">${conteudo}</div>