Menu Display
Breadcrumb
Stéphane Desjardins
Rédacteur en chef coopoint.info
Maureen Jouglain
Journaliste indépendante.
Maël Brunet
Rédacteur
Pub-salles-Temps-des-fêtes-2025-VBLH-CR
Préserver l’écho d’une région
10 500 $ en prix à gagner!
CHNC FM, la voix de la Gaspésie
CHNC FM, la voix de la Gaspésie
2025-12-05
VIA 90.5, la voix de la Rive-Sud
VIA 90.5, la voix de la Rive-Sud
2025-05-12
M105, une radio à l’épreuve du temps
M105, une radio à l’épreuve du temps
2025-05-12
Le pari réussi de Pop Country 103.1
Le pari réussi de Pop Country 103.1
2025-05-12
Préserver l’écho d’une région
Préserver l’écho d’une région
2025-05-12
Asset Publisher
An error occurred while processing the template.
For "." left-hand operand: Expected a hash, but this has evaluated to a string (wrapper: f.t.SimpleScalar):
==> expandoToChange [in template "79933785239121#20119#41645" at line 118, column 34]
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign tmp = expandoToChange.setAttr... [in template "79933785239121#20119#41645" at line 118, column 19]
----
1<#--
2Widget templates can be used to modify the look of a
3specific application.
4
5Please use the right panel to quickly add commonly used variables.
6Autocomplete is also available and can be invoked by typing "${".
7-->
8
9
10<#function getDate maDate, daysToAdd>
11 <#if maDate =="all">
12 <#local maDate=addDays(.now,daysToAdd)>
13 <#else>
14 <#attempt>
15 <#if maDate?has_content>
16 <#local maDate = dateUtil.parseDate("yyyy-MM-dd",maDate,locale)/>
17 <#else>
18 <#local maDate=addDays(.now,daysToAdd)/>
19 </#if>
20 <#recover>
21 <#local maDate=addDays(.now,daysToAdd)/>
22 </#attempt>
23 </#if>
24 <#return maDate>
25</#function>
26
27
28<div class="text-center">
29
30<#assign lienToShow = "">
31<#assign titreToShow = "">
32<#assign imageFicheToShow = "">
33<#assign nombreDeVuesToShow = 10000000>
34<#assign expandoToChange = "">
35<#assign index = 0>
36<#assign bestScore = -1>
37<#if entries?has_content>
38 <#list entries as curEntry>
39 <#assign renderer = curEntry.getAssetRenderer()>
40 <#assign className = renderer.getClassName()>
41 <#if className == "com.liferay.journal.model.JournalArticle">
42 <#assign journalArticle = renderer.getArticle()>
43
44 <#assign document = saxReaderUtil.read(journalArticle.getContent())>
45 <#assign rootElement = document.getRootElement()>
46 <#assign articleId = journalArticle.getArticleId()>
47
48 <#assign lien = "">
49 <#assign titre = "">
50 <#assign date_debut = "">
51 <#assign date_fin = "">
52 <#assign format = "">
53 <#assign imageFiche = "">
54 <#assign imageArticleContent = "">
55
56
57 <#assign expandoBridge = journalArticle.getExpandoBridge()>
58 <#assign hasAttribute = expandoBridge.hasAttribute("nbvues")>
59 <#assign nombreDeVues = expandoBridge.getAttribute("nbvues")>
60
61 <#list rootElement.elements() as dynamicElement>
62 <#if dynamicElement.attributeValue("name") == "Text96424148">
63 <#assign titre = dynamicElement.element("dynamic-content").getText()>
64 </#if>
65 <#if dynamicElement.attributeValue("name") == "Text40058933">
66 <#assign lien = dynamicElement.element("dynamic-content").getText()>
67 </#if>
68 <#if dynamicElement.attributeValue("name") == "Date38504422">
69 <#assign date_debut = dynamicElement.element("dynamic-content").getText()>
70 </#if>
71 <#if dynamicElement.attributeValue("name") == "Date12132604">
72 <#assign date_fin = dynamicElement.element("dynamic-content").getText()>
73 </#if>
74 <#if dynamicElement.attributeValue("name") == "Select07511272">
75 <#assign format = dynamicElement.element("dynamic-content").getText()>
76 </#if>
77 <#if "Image02997258" == dynamicElement.attributeValue("name")>
78 <#assign imageArticleContent = dynamicElement.element("dynamic-content").getText()>
79 <#if imageArticleContent??>
80 <#assign imgJson = jsonFactoryUtil.createJSONObject(imageArticleContent)>
81 <#if imgJson.url?has_content>
82 <#assign imageFiche = imgJson.url>
83 <#elseif imgJson.groupId?has_content>
84 <#assign imageFiche = "/documents/"+ imgJson.groupId +"/" +imgJson.resourcePrimKey +"/"+ imgJson.name +"/"+imgJson.uuid>
85 </#if>
86 </#if>
87 </#if>
88 </#list>
89 </#if>
90
91 <#assign dateDebut = getDate(date_debut,0)>
92 <#assign dateFin = getDate(date_fin,0)>
93
94 <#if (dateUtil.compareTo(dateDebut?date,.now?date) <= 0) && (dateUtil.compareTo(dateFin?date,.now?date) >= 0)>
95 <#assign seed = (.now?long * (index + 1))?abs>
96 <#assign randomScore = (seed % 10000) / 100.0>
97
98
99
100
101
102 <#if index == 0>
103 <#assign bestScore = randomScore>
104 </#if>
105 <#if (randomScore >= bestScore)>
106 <#assign bestScore = randomScore>
107 <#assign lienToShow = lien>
108 <#assign titreToShow = titre>
109 <#assign imageFicheToShow = imageFiche>
110 <#assign expandoToChange = expandoBridge>
111 <#assign articleIdToShow = articleId>
112 <#assign nombreDeVuesToShow = nombreDeVues>
113 </#if>
114 </#if>
115 <#assign index = index + 1>
116 </#list>
117 <#if expandoToChange??>
118 <#assign tmp = expandoToChange.setAttribute("nbvues",nombreDeVuesToShow+1)>
119 </#if>
120 <a href="/web/coopoint/clicpub?id=${articleIdToShow}&lien=${lienToShow}" target="_blank"><img style="max-width:70%;" src="${imageFicheToShow}" alt="${titreToShow}" /></a>
121</#if>
122
123</div>
Bouton Je m'abonne à la revue Coopoint.
Asset Publisher
Asset Publisher
Asset Publisher
Heading Example
We use cookies to deliver personalized content, analyze trends, administer the site, track user movements on the site, and collect demographic information about our user base as a whole. Accept all cookies for the best possible experience on our website or manage your preferences.
Visit our Privacy Policy