[Silva-general] Inline news viewer

Andy Altepeter aaltepet at bethel.edu
Mon Mar 12 12:40:09 CET 2007


Hi David,

You can use the zope acquisition api to get the parent of the News Article 
Version, which is always the News Article, so:

item/aq_parent/id

Cheers,
Andy

On Monday 12 March 2007 06:32, David Gillies wrote:
> Hi all,
>
> In the inline news viewer (see below) I would like to get the News Article
> 's id.  At the moment the item id is that of the latest version.  How can I
> get at the artcile's actual id?
>
> <tal:block tal:condition="python:len(items) > 0">
>         <div class="news-item" tal:repeat="item items">
> <p tal:replace="item/title" />
>           <tal:block tal:define="title item/title">
>             <h3 tal:content="structure title"
>                 tal:condition="python:options['show_link_article'] ==
> 'separate'">
>               title
>             </h3>
>             <h3 tal:condition="python:options['show_link_article'] !=
> 'separate'">
>               <a tal:attributes="href item/link"
>                   tal:content="structure title">
>                 title
>               </a>
>             </h3>
>           </tal:block>
>
> David
>
>
> --
> David Gillies
> Web Support Officer
> Web Services
> EISD
>
> ext: 45786
>
>
>
> _______________________________________________
> Silva-general mailing list
> Silva-general at infrae.com
> https://infrae.com/mailman/listinfo/silva-general



More information about the Silva-general mailing list