Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.

My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      i18n:domain="plone">

<body>

<div metal:define-macro="base_portlet"
     tal:define="results here/getCatalogDestaques.py"
     tal:condition="results">

    <div class="titulo-destaques">
    <a href="#" title="destaques"
    tal:attributes="href string:${here/absolute_url}/;"
  >Destaques</a>
  </div>

    <div class="portlet_destaques">
    <tal:block tal:repeat="item results">
      <div class="destaque-tile"
        tal:attributes="class python:test(repeat['obj'].odd(),
                                 'destaque-tile esquerda',
                                 'destaque-tile direita')">

      <tal:block tal:define="result_url item/getURL; 
                         url string:$result_url/view;">

        <a href="#" tal:attributes="href url;  title item/Description" >
        <p class= "destaques-title" tal:content="python:item.Title or item.getId" />
          <p class= "destaques-descricao" tal:content="python:item.Description"/>
          </a>
  </div>

      </tal:block>
  </tal:block>
  </div>
</div>
</body>

</html>



---------------------------------------------------------
script

parameters=

1
2
3
lista-fixos = []
lista-normal=[]
lista-final=[]

lista de destaques fixos,

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
lista-fixos = context.portal_catalog.searchResults(
        Subject = { "query": ["Destaques", "Destaques-fixo"],
                     "operator": "and" 
                     }
)
lista-normal = context.portal_catalog.searchResults(
    Subject = { "query": ["Destaques"]}

)

lista-fixos.append(lista-normal)

for e in lista-fixos:
       if e not in lista-final:
           lista-final.append(e)

# enter your query into the kw dictionary
return lista-final