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

Patch to allow eZObjectRelationList in contentobject name

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 3.8.8, 3.9.2
    • Fix Version/s: 3.10.0alpha1, 3.8.9, 3.9.3
    • Component/s: Misc
    • Labels:
      None

      Description

      The following patch allows usage of eZObjectRelationList fields in the content object name

      --- ezpublish-3.9.2/kernel/classes/datatypes/ezobjectrelationlist/ezobjectrelationlisttype.php  2007-05-04 13:33:29.000000000 +0200
      +++ www/ezpublish-3.9.2/kernel/classes/datatypes/ezobjectrelationlist/ezobjectrelationlisttype.php      2007-05-19 11:48:33.000000000 +0200
      @@ -1454,13 +1454,27 @@
           }
      
           /*!
      -     Returns the content of the string for use as a title
      +     Returns the content of the string for use as a title,
      +     for simplicity this is the name of the first object referenced or false.
           */
           function title( &$contentObjectAttribute )
           {
      -        return false;
      +        $objectAttributeContent = $this->objectAttributeContent($contentObjectAttribute);
      +
      +        if (count($objectAttributeContent['relation_list'])>0)
      +        {
      +            $target=$objectAttributeContent['relation_list'][0];
      +            $targetObject =& eZContentObject::fetch( $target['contentobject_id'] );
      +            return $targetObject->Name;
      +        }
      +        else
      +        {
      +            return false;
      +        }
           }
      
      +
      +
           /*!
            \reimp
           */
      

        Attachments

          Activity

            People

            Assignee:
            rl Ruslan Lisnyk
            Reporter:
            Gabriel Ambuehl Gabriel Ambuehl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: