[Plone-UI] Grabbing an article title or description out of context.
Veda Williams
veda at onenw.org
Tue Apr 14 20:00:32 UTC 2009
Maybe this will help? It gives you a few ideas of things you could pull
in... Just make sure you grab the object first.
<tal:loop repeat="item featured">
<div class="featured-item"
tal:define="item_object item/getObject">
<a tal:attributes="href item_object/absolute_url;"
tal:condition="exists:item_object/image_tile">
<img src="" alt=""
tal:replace="structure python:
path('nocall:item_object/tag')(scale='thumb', css_class='thumbImage')" />
</a>
<h3 class="tileHeadline"
metal:define-macro="listitem">
<a href="#"
class="summary url"
tal:attributes="href
item_object/absolute_url"
tal:content="item/pretty_title_or_id">
Item Title
</a>
</h3>
<span class="hidden"
tal:replace="python:toLocalizedTime(item.ModificationDate,long_format=1)">
August 16, 2001 at 23:35:59
</span>
<p class="tileBody">
<span class="description"
tal:content="item/Description">
description
</span>
</p>
<span class="featuredClear"></span>
</div>
</tal:loop>
On 4/14/09 12:54 PM, "erik kulvinskas" <vaporboy at gmail.com> wrote:
>
>
> Hey all,
>
> I have been struggling with this for a while now. If you go to our beta test
> site at: http://ext.dot.state.co.us you will see that in the header, just
> below the logo is some static text. I would like to make that dynamic by
> simply, or 'simply', grabbing the description from a news article that exists
> in the content database. I have read many articles on this but have fallen
> short of successfully doing it. I have started over and would like a fresh
> view on this. I have read that i can access the description of a news article
> by following a particular path-ing mechanism but i can never get it to work.
> Could someone point me in the right direction here concerning how to do this?
>
> Thanks,
>
> -Erik
>
> All,
>
> I was able to find a snippet of code that gets ALL of the text for the
> article. Any help trying to find out how to just get its description or title
> would be gratefuly appreciated.
> <tal:block tal:condition="exists:here/staging/newssection/overview.html"
> tal:replace="structure
> here/staging/newssection/overview.html/getText">
More information about the UI
mailing list