Author Topic

Ekkehard Dörre

Saturday 26 March 2005 1:54:19 am

Comment42648

For long texts and documents there should be a splitting. After e.g. a header=1

<text:h text:style-name="Heading 1" text:level="1">huhu</text:h>

a new article is used with

'sort_field' => 8,
'sort_order' => 1,
'priority' => $my_sort_numbers,

Use these controls to set the sorting method for the sub items of the current location in kernel/classes/ezcontentobjecttreenode.php

 /*!
     \return the field name for the sort order number \a $sortOrder.
             Gives a warning if the number is unknown and return \c 'path'.
    */
    function sortFieldName( $sortOrder )
    {
        switch ( $sortOrder )
        {
            default:
                eZDebug::writeWarning( 'Unknown sort order: ' . $sortOrder, 'eZContentObjectTreeNode::sortFieldName' );
            case 1:
                return 'path';
            case 2:
                return 'published';
            case 3:
                return 'modified';
            case 4:
                return 'section';
            case 5:
                return 'depth';
            case 6:
                return 'class_identifier';
            case 7:
                return 'class_name';
            case 8:
                return 'priority';
            case 9:
                return 'name';
            case 10:
                return 'modified_subnode';
        }
    }

and

 /*!
     \return the field name for the sort order number \a $sortOrder.
             Gives a warning if the number is unknown and return \c 'path'.
    */
    function sortFieldID( $sortFieldName )
    {
        switch ( $sortFieldName )
        {
            default:
                eZDebug::writeWarning( 'Unknown sort order: ' . $sortFieldName, 'eZContentObjectTreeNode::sortFieldID()' );
            case 'path':
                return 1;
            case 'published':
                return 2;
            case 'modified':
                return 3;
            case 'section':
                return 4;
            case 'depth':
                return 5;
            case 'class_identifier':
                return 6;
            case 'class_name':
                return 7;
            case 'priority':
                return 8;
            case 'name':
                return 9;
            case 'modified_subnode':
                return 10;
        }
    }

'sort_order' => 1, is Ascending
'sort_order' => 0, is Descending

$my_sort_numbers is important for sorting the pages, so first page is the first, second ...

Greetings, ekke

http://www.coolscreen.de - eZ Publish, Ibexa, SOLR, Elastic Search