Forums / Setup & design / fetching news

fetching news

Author Message

andrea giorgini

Monday 20 August 2007 8:04:47 am

Hi all,

first timer here :-)

I am following the "Building an eZ Publish site" (even if I understand it is old) document just to get warm with the CMS.

I am overriding the latest news template, and following the doc I wrote:

<h1>Latest news</h1>

{let children = fetch(content, list, hash(parent_node_id, $node.node_id
										  sort_by, $node.sort_array,
										  limit, 7,
										  class_filter_type, include,
										  class_filter_array, array('article')
										  )
					)
}

{section name=Child loop=$children}
	{node_view_gui view=line content_node=$Child:item}
	<hr />
{/section}

{/let}

Now I get the following error from the debug:

parser error @ design/tscm/override/templates/full_view_news_folder.tpl:3
Empty variable name at [(content, list, hash(parent_node_id, $node.node_id
sort_by, $node.sort_array,
limit, 7,
class_filter_type, include,
class_filter_array, array('article')
)
)
]

What am I doing wrong?
Thx a lot

Andrea

Felix Laate

Monday 20 August 2007 11:26:43 am

Hi Andrea,

welcome to the forum.

I think there is something wrong with your fetch-syntax. It should look something like this, I think:

{fetch( 'content', 'list',
        hash( 'parent_node_id', $node.node_id,
                 'class_filter_type',  'include',
                 'class_filter_array', array( 'folder' )
                 'sort_by', array( 'published', false() ) ) )}

For more info:
http://ez.no/doc/ez_publish/technical_manual/3_9/reference/modules/content/fetch_functions/list

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

andrea giorgini

Tuesday 21 August 2007 12:20:20 am

Hey Felix,

thx a lot for the welcome and for your answer.
I found out there was a comma missing after $node.node_id, what a stupid mistake.

Thx again!

Andrea