AnsweredAssumed Answered

recover associations

Question asked by jcl on Oct 18, 2007
I want recover meta-data with script php (php library)
here my model

<!– Définition du type publication –>
        <type name="mm:publication">
            <title>Publication</title>
            <parent>cm:content</parent>
            <properties>
                <property name="mm:isbn">
                    <title>Numéro ISBN </title>
                    <type>d:text</type>
                    <!–<mandatory>true</mandatory>–>
                </property>
                <property name="mm:prix">
                    <title>prix</title>
                    <type>d:text</type>
                    <!–<mandatory>true</mandatory>–>
                </property>
                <property name="mm:caracteristique">
                    <title>Caracteristique</title>
                    <type>d:text</type>
                    <!–<mandatory>true</mandatory>–>
                </property>
            </properties>
            <associations>
                <association name="mm:association">
                    <title>Association </title>
                    <target>
                        <class>mm:publication</class>
                        <mandatory>false</mandatory>
                        <many>true</many>
                    </target>
                </association>
            </associations>
        </type>

here my script php,

[code]
…………………….
// Nom du fichier
$doc = $d_child->child->cm_name;
echo $doc.'</br>';
//recupération des properties
$prop = $d_node->properties;

echo 'Titre : '.$prop['{http://www.alfresco.org/model/content/1.0}title'].'</br>';
echo 'Description : '.$prop['{http://www.alfresco.org/model/content/1.0}description'].'</br>';
echo 'Auteur : '.$prop['{http://www.alfresco.org/model/content/1.0}author'].'</br>';
echo 'Prix : '.$prop['{cetmef.model}prix'].'</br>';
echo 'N° ISBN: '.$prop['{cetmef.model}isbn'].'</br>';
echo 'Caractéristique : '.$prop['{cetmef.model}caracteristique'].'<br>';

//recuperation du fichier associé
$as = $d_node->associations;
…………….
i recover all the properties( title, description ….)
how recover the url of the file associate
thank you

Outcomes