RES: RES: RES: [zope-pt] Capturar imagem de uma notícia

2009-03-04 Por tôpico Carmelita Cristina Tolentino
 

Se colocar esse código:

 

  img tal:attributes=src python:'%s/imagens-destaque/' %(obj.getURL()) /

 

Ele busca essa url:

 

http://192.168.2.244:8080/plonesite/em-destaques/stj-promove-revolucao-tecnologica-na-tramitacao-de-processos/imagens-destaque/

 

 

imagens-destaque: é a pasta onde as imagem são adicionadas

em-destaques: onde fica as notícias

stj-promove-revolucao-tecnologica-na-tramitacao-de-processos: última notícia 
adicionada no site (na pasta destaques), no qual possui a imagem que deveria ir 
para a página principal junto com o título e descrição da notícia.

 





RES: [zope-pt] Capturar imagem de uma notícia

2009-03-02 Por tôpico Carmelita Cristina Tolentino
Não deu certo não Cleber, será que fiz algo errado? É desse jeito mesmo que 
coloco?

Está dando esse erro:

 

 

Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec
  Module Products.PageTemplates.ZopePageTemplate, line 427, in pt_render
  Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render
  Module Products.CacheSetup.patch_utils, line 9, in call_pattern
  Module Products.PageTemplates.PageTemplate, line 89, in pt_render
  Module zope.pagetemplate.pagetemplate, line 117, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 891, in do_useMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 949, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 891, in do_useMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 824, in do_loop_tal
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 623, in do_insertText_tal
  Module Products.PageTemplates.Expressions, line 228, in evaluateText
  Module zope.tales.tales, line 696, in evaluate
   - URL: /arquivar/Arquivar/pagina_principal/portlet_destaques
   - Line 44, Column 0
   - Expression: PathExpr standard:u'obj/image'
   - Names:
  {'container': PloneSite at /site ,
   'context': PloneSite at /site ,
   'default': object object at 0x2b8ecd4ac200,
   'here': PloneSite at /site ,
   'loop': {u'obj': Products.PageTemplates.Expressions.PathIterator object 
at 0x2eba7350},
   'nothing': None,
   'options': {'args': ()},
   'repeat': Products.PageTemplates.Expressions.SafeMapping object at 
0x2aaab244def0,
   'request': HTTPRequest, URL=http://www.site.com.br/index_html,
   'root': Application at ,
   'template': ZopePageTemplate at /site/index_html,
   'traverse_subpath': [],
   'user': SpecialUser 'Anonymous User'}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 153, in _eval
  Module zope.tales.expressions, line 124, in _eval
  Module Products.PageTemplates.Expressions, line 83, in boboAwareZopeTraverse
  Module zope.traversing.adapters, line 164, in traversePathElement
   - __traceback_info__: (Products.ZCatalog.Catalog.mybrains object at 
0x2aaab4be15d0, 'image')
  Module zope.traversing.adapters, line 52, in traverse
   - __traceback_info__: (Products.ZCatalog.Catalog.mybrains object at 
0x2aaab4be15d0, 'image', [])
TraversalError: (Products.ZCatalog.Catalog.mybrains object at 0x2aaab4be15d0, 
'image')

 

 



De: zope-pt@yahoogrupos.com.br [mailto:zope...@yahoogrupos.com.br] Em nome de 
Cleber J Santos
Enviada em: segunda-feira, 2 de março de 2009 12:16
Para: zope-pt@yahoogrupos.com.br
Assunto: Re: [zope-pt] Capturar imagem de uma notícia

 

Veja se é isso que você deseja:

tal:img tal:content=obj/image /br
tal:imgmini tal:content=obj/image_mini /br
tal:imgth tal:content=obj/image_thumb /br

Att,
Cleber J Santos

--- Em seg, 2/3/09, Carmelita Cristina Tolentino crist...@arquivar.com.br 
escreveu:

De: Carmelita Cristina Tolentino crist...@arquivar.com.br
Assunto: [zope-pt] Capturar imagem de uma notícia
Para: zope-pt@yahoogrupos.com.br
Data: Segunda-feira, 2 de Março de 2009, 11:26

Como faço pra chamar no meu Page Template O título, descrição e a imagem de uma 
certa notícia.

 

Eu consegui chamar o título e a descrição, mas a imagem não. Alguém sabe como 
posso fazer?

 

 

 

dd tal:define=oddrow repeat/obj/odd

   tal:attributes=class python:test( 'portletItem' )

 

 span tal:replace=obj/pretty_title_ or_id

   titulo_ou_id 

/span

br

a href=

   class=tile

   tal:attributes=href obj/getURL;

   title