How to make a "box" with content from a News folder?

How to make a "box" with content from a News folder?

Wednesday 18 June 2003 9:02:21 am - 3 replies

Author Message

Paul Borgermans

Wednesday 18 June 2003 10:04:11 am

Try the following (and define div.menuintro in your css file)

<table class="menu" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th class="menuhead">
News
</th>
</tr>
{section name=News loop=$news_list}
<tr>
<td class="menuitem">

<div class="menuname">
<a href={concat('content/view/full/',$News:item.node_id)|ezurl}>{$News:item.name|wash}</a>
</div>
<div class="menuintro">
{atttribute_view_gui attribute=$News:item.datamap.intro}
</div>
<div class="menudate">({$News:item.object.published|l10n(shortdate)})</div>

</td>
</tr>
{delimiter}
{/delimiter}
{/section}
</table>

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Robin Sørlie

Thursday 19 June 2003 12:21:42 am

Thx for quick answer but it doesn't seem to work either. The news list also stopps when the {atttribute_view_gui attribute=$News:item.datamap.intro} should be printed, no more news are listed. Any other suggestion?

Alexei Pechekhonov

Thursday 19 June 2003 12:31:33 am

Paul, hm... it looks like eZ publish stoped to use his great feature view=some_my_view
Because the debugger says even on demo:
tpl code:
{node_view_gui view=menu content_node=$News:item}

>>Warning: eZTemplate:node_view_gui
None of the templates design:node/view/menu.tpl could be found <<

That is the reason why we can't see short-menu view on right hand column
on demo (3.1 and current SVN 2751 as well).
It means, if target folder consists not only News-class objects we should set {node_view_gui content_node=$News:item.data_type.identifier_you_want_to_show} for every classes? In previous version it was very eazy to create view tpl's for appropriated classes. What should we do now? Is it new eZ aproach from SVN 2444? (3.1, 3.1.1 beta 2). What do you think?
How is the {node_view_gui view=... } should be used now?

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.