Html Ez发布有3个孩子的类如何只获取一个?

Html Ez发布有3个孩子的类如何只获取一个?,html,ezpublish,Html,Ezpublish,所以我使用ez Publish。我有一个联系文件夹,里面有3个儿童班 我在头脑中定义: { $contact_node_id = 258 $contact_classes = array('dnd_locations','dnd_textblock','dnd_contactform') $contact_folder = fetch( 'content', 'node', hash( 'node_id', $contact_node_id ) ) $contact_children =

所以我使用ez Publish。我有一个联系文件夹,里面有3个儿童班

我在头脑中定义:

{    $contact_node_id = 258
$contact_classes = array('dnd_locations','dnd_textblock','dnd_contactform')
$contact_folder = fetch( 'content', 'node', hash( 'node_id', $contact_node_id ) )
$contact_children = array()
$contact_children_count=fetch_alias( 'children_count', hash( 'parent_node_id', 258,
                                        'class_filter_type', 'include',
                                        'class_filter_array', $contact_classes ) )
}

{if $contact_children_count}
    {set
    $contact_children = fetch_alias( 'children', hash( 'parent_node_id', $contact_node_id,
                                        'offset', 0,
                                        'sort_by', array( 'priority', true() ),
                                        'class_filter_type', 'include',
                                        'class_filter_array', $contact_classes,
                                        'limit', 100 ) )
    }
{/if}
要获取我使用的内容,请执行以下操作:

    {if $contact_children_count}
    {foreach $contact_children as $index => $child }
        {node_view_gui content_node=$child view=full}
    {/foreach}
{/if}
但随后它会获取所有3个孩子的内容。我如何定义它应该只获取第一个


希望有人能帮助我

“fetch”函数中的“Limit”就是您要寻找的


所以用1代替100。就是这样

您要查找的是fetch函数中的“Limit”


所以用1代替100。就是这样

您要查找的是fetch函数中的“Limit”


所以用1代替100。就是这样

您要查找的是fetch函数中的“Limit”

所以用1代替100。就这样