how to display the articles from the second one?

how to display the articles from the second one?

Monday 12 November 2007 7:44:18 pm - 4 replies

Modified on Monday 12 November 2007 7:46:00 pm by Fiona Hisa

Author Message

Gunnar Birkeland

Monday 12 November 2007 9:24:58 pm

Hi Lost.

Why not make two fetches?

One for the ten latest

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

And one for the other (based on your sort criteria.)

{let selectedChild=fetch( content, list, hash( parent_node_id, node.node_id, limit, 1, class_filter_type, include, class_filter_array, array( 'article' ),sort_by, array( 'YOURCRITERIA', false() ) ) )}

If the 'selectedChild' exits in the 'children' array you could easily extend the limit by one or exclude the 'selectedChild' from the 'children' search.

gl

</major>
----------------------------
ez-version: 3.9.3.
PHP: 4.4.2-1
MYSQL: 4.0.24

Gunnar Birkeland

Monday 12 November 2007 9:31:12 pm

But hey, why not make it simple.

Ill add this up to the "early morning, cold country" list;)

The use of offset would off course be the best here.

Add

...
'offset', 1,
...

to your fetch (or maybe it should be 2?, not quite sure)

http://ez.no/doc/ez_publish/technical_manual/3_10/reference/modules/content/fetch_functions/list

gl

</major>
----------------------------
ez-version: 3.9.3.
PHP: 4.4.2-1
MYSQL: 4.0.24

Fiona Hisa

Monday 12 November 2007 10:53:52 pm

Thanks a lot!
it works
offset, 1

I am not very sure what is the "offset" exact mean before, hehe.
^_^

paul bolger

Wednesday 14 November 2007 4:10:24 pm

Take a look at this article, actually by Bård Farstad, although for some reason the article list says its by Sandro Groganz.

http://ez.no/developer/articles/building_a_custom_template_for_a_news_portal

Paul Bolger

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.