Bonjour mon probleme est le suivant :
J'ai ceci
que je voudrais classer par odre alphabetique comme cela :Bach Johann Sebastian
Compositeur
Vivaldi Antonio Lucio
Interprète
Charpentier Antoine
Compositeur
Compositeur
Bach Johann Sebastian
Charpentier Antoine
Interprète
Vivaldi Antonio Lucio
Voici mes appels de template, cette partie de code ce fait en boucle
et voici mes templates :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 <!-- START: including template: extension/cmbv/design/philidor/override/templates/ezobjectrelationbrowse/oeuvre_lien_content_view.tpl (design:content/datatype/view/ezobjectrelationbrowse.tpl) --> <!-- START: including template: extension/cmbv/design/philidor/templates/content/view/lop_full.tpl (extension/cmbv/design/philidor/templates/content/view/lop_full.tpl) --> <div class="block"> <div class="labelbreak"></div> <!-- START: including template: extension/cmbv/design/philidor/override/templates/ezobjectrelationbrowse/lop_lien_content_view.tpl (design:content/datatype/view/ezobjectrelationbrowse.tpl) --> <!-- START: including template: extension/cmbv/design/philidor/templates/content/view/lop_line.tpl (extension/cmbv/design/philidor/templates/content/view/lop_line.tpl) --> <a href="/Artistes/Bach-Johann-Sebastian">Bach Johann Sebastian </a> <!-- STOP: including template: extension/cmbv/design/philidor/templates/content/view/lop_line.tpl (extension/cmbv/design/philidor/templates/content/view/lop_line.tpl) --> <br> <!-- STOP: including template: extension/cmbv/design/philidor/override/templates/ezobjectrelationbrowse/lop_lien_content_view.tpl (design:content/datatype/view/ezobjectrelationbrowse.tpl) --> </div><div class="block"> <div class="labelbreak"></div> <!-- START: including template: design/standard/templates/content/datatype/view/ezobjectrelationlist.tpl (design:content/datatype/view/ezobjectrelationlist.tpl) --> <!-- START: including template: design/standard/templates/content/view/embed.tpl (design/standard/templates/content/view/embed.tpl) --> <a href="/Materiel-Documentaire/Type-de-personne/Compositeur">Compositeur</a> <!-- STOP: including template: design/standard/templates/content/view/embed.tpl (design/standard/templates/content/view/embed.tpl) --> <br> <!-- STOP: including template: design/standard/templates/content/datatype/view/ezobjectrelationlist.tpl (design:content/datatype/view/ezobjectrelationlist.tpl) --> </div>
oeuvre_lien_content_view.tpl :
lop_full.tpl
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 {section name=Relation loop=$attribute.content.relation_browse} {content_view_gui view=lop_full content_object=fetch(content,object,hash(object_id,$:item.contentobject_id,object_version,$:item.contentobject_version))}<br /> {section-else} {'There are no related objects.'|i18n( 'design/standard/content/datatype' )} {/section}
lop_lien_content_view.tpl
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 {section name=ContentObjectAttribute loop=$object.contentobject_attributes} <div class="block"> <div class="labelbreak"></div> {attribute_view_gui attribute=$ContentObjectAttribute:item} </div> {/section}
lop_line.tpl
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 {section name=Relation loop=$attribute.content.relation_browse} {content_view_gui view=lop_line content_object=fetch(content,object,hash(object_id,$:item.contentobject_id,object_version,$:item.contentobject_version))}<br /> {section-else} {'There are no related objects.'|i18n( 'design/standard/content/datatype' )} {/section}
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 {* DO NOT EDIT THIS FILE! Use an override template instead. *} {default node_name=$object.main_node.name node_url=$object.main_node.url_alias}{section show=$node_url}<a href={$node_url|ezurl}>{/section}{$node_name|wash}{section show=$node_url}</a>{/section} {/default}
sachant que la classe que le nom des compositeur et Interpretes sont en faites un "relation_object" ,composé de deux champs, ( nom et type de lartiste ), de la classe Oeuvre.
J'ai tout d'abord essayé de travailler dans le template
oeuvre_lien_content_view.tpl afin de pouvoir fetcher les informations et de faire un "sort_by", mais la boucle {section} me pose probleme.
J'implore donc votre aide.....toutes mes autres tentatives sont des echecs.
Merci
Partager