Using XML field as Object Name Pattern problem

Author Message

Ted Striker

Friday 23 July 2004 4:45:44 am

I have created a custom calss where a XML text field named "title", the title of the object, so I set Object Name Pattern to <tittle> with makes the admin interface to display all XML tags in content interface:

<?xml version="1.0" encoding="UTF-8"?> <section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"> <paragraph>....

Obviously not very usefull when working with admin interface and contents... Is there anyway to make the admin interface display the text inside the xml text field? Should I use any other datatype as title?

TIA

Can you feel it Mr. Anderson? Closing in on you? Oh I can, I really should thank you after all. It was, after all, it was your life that taught me the purpose of all life. Purpose of life is to end.

Paul Forsyth

Friday 23 July 2004 4:55:55 am

I tried this but eZ doesnt support it. I filed this bug but they dont want to do anything about it:

http://ez.no/community/bug_reports/using_a_xml_text_field_attribute_within_an_object_name_pattern_fails_when_embedding

You could change the xmltextfield title attribute. Currently it is this:

   /*!
     Returns the text.
    */
    function title( &$contentObjectAttribute )
    {
        return eZXMLTextType::rawXMLText( $contentObjectAttribute );
    }

Which returns raw xml text, hence the problem... so you could try something there.

paul

--
http://www.visionwt.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.