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.

eZ debug

Timing: Jan 20 2025 02:26:18
Script start
Timing: Jan 20 2025 02:26:18
Module start 'layout'
Timing: Jan 20 2025 02:26:18
Module start 'content'
Timing: Jan 20 2025 02:26:18
Module end 'content'
Timing: Jan 20 2025 02:26:18
Script end

Main resources:

Total runtime0.0156 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.2891152.6406
Module start 'layout' 0.00570.0029 741.929739.4922
Module start 'content' 0.00860.0048 781.421989.4922
Module end 'content' 0.01340.0022 870.914130.3047
Script end 0.0156  901.2188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002516.1973140.0002
Check MTime0.00117.0489140.0001
Mysql Total
Database connection0.00127.676910.0012
Mysqli_queries0.002314.504230.0008
Looping result0.00000.082510.0000
Template Total0.001710.910.0017
Template load0.00095.890610.0009
Template processing0.00085.005910.0008
Override
Cache load0.00063.960710.0006
General
dbfile0.00031.824580.0000
String conversion0.00000.045840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs