Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-9160

foward / back link in image gallery not working

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 4.5.0beta2
    • 3.8.4
    • Misc
    • None
    • Version: 3.8.4
      PHP Version: 4.4.2
      Webserver: apache
      Database: mysql

    Description

      Hi,

      if you have e.g. a gallery folder with 5 images which have the same object name and you sort the folder by the name, the forward / back link in the image template is not working.

      file: design/base/templates/override/full/image.tpl

      ...
      {let sort_order=$node.parent.sort_array[0][1]
           sort_column=$node.parent.sort_array[0][0]
           sort_column_value=cond( $sort_column|eq( 'published' ), $node.object.published,
                                   $sort_column|eq( 'modified' ), $node.object.modified,
                                   $sort_column|eq( 'name' ), $node.object.name,
                                   $sort_column|eq( 'priority' ), $node.priority,
                                   $sort_column|eq( 'modified_subnode' ), $node.modified_subnode,
                                   false() )
           previous_image=fetch_alias( subtree, hash( parent_node_id, $node.parent_node_id,
                                                      class_filter_type, include,
                                                      class_filter_array, array( 'image' ),
                                                      limit, 1,
                                                      attribute_filter, array( and, array( $sort_column, $sort_order|choose( '>', '<' ), $sort_column_value ) ),
                                                      sort_by, array( $sort_column, $sort_order|not ) ) )
           next_image=fetch_alias( subtree, hash( parent_node_id, $node.parent_node_id,
                                                  class_filter_type, include,
                                                  class_filter_array, array( 'image' ),
                                                  limit, 1,
                                                  attribute_filter, array( and, array( $sort_column, $sort_order|choose( '<', '>' ), $sort_column_value ) ),
                                                  sort_by, array( $sort_column, $sort_order ) ) ) }
      ...
      

      example name of the images "Aufbau" ...

      shortened query which is produced by the template code:

      SELECT ezcontentobject.name FROM ezcontentobject WHERE ezcontentobject.name < 'Aufbau' order by ezcontentobject.name
      

      So, no previous / next images is found because no name is "smaller" or "greater" than "Aufbau" in this folder.

      Best wishes,
      Georg.

      Attachments

        Activity

          People

            andre1 andre1
            emil.webber emil.webber
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: