Salut,
je suis entrain de le faire, j'ai créer un modèle de rangé vidéo et audio. Pour les vidéos, je suis parti du modèle de rangé, [Médiathèque] - Recherche proposé par la version démo du CMS Automne.
Voilà, le code que j'utilise:
Code :
<row>
   <block module="pmedia" id="mediassearch" cache="0">
      <div class="pmedia">
         <atm-xml what="{request:string:out} == 'xml'">
            <atm-search what="{Media}" name="mediaresult">
               <atm-search-param search="mediaresult" type="keywords" value="spider-man" mandatory="false" />
               <atm-search-param search="mediaresult" type="pmedia-category" value="Vidéo" mandatory="false" />
               <atm-search-param search="mediaresult" type="item" value="{request:int:item}" mandatory="false" />
               <atm-search-limit search="mediaresult" value="5" />
               <atm-search-page search="mediaresult" value="{request:int:page}" />
               <atm-search-order search="mediaresult" type="objectID" direction="desc" />
               <atm-result search="mediaresult">
                  <atm-if what="{firstresult}">
                     <atm-start-tag tag="div" class="pmedia-results" />
                  </atm-if>
                  <atm-if what="{firstresult} && !{request:int:item}">
                     <div>{maxresults} résultat(s) pour votre recherche.</div>
                  </atm-if>
                  <div class="pmedia-result">
                     <!--<h2 title="Afficher - Masquer le média">{Media:label}</h2>-->
                     <div class="pmedia-content">
                        <atm-if name="oembed" what="{Media:Media_externe:hasValue}">
                           <div class="right">
                              {Media:Media_externe:html|320,250}
                           </div>
                           <p>
                              <atm-if name="oembedTitle" what="{Media:Media_externe:url} && {Media:Media_externe:title}">
                                 Média : <a href="{Media:Media_externe:url}" target="_blank"><strong>{Media:Media_externe:title}</strong></a><br />
                              </atm-if>
                              <atm-else for="oembedTitle" what="{Media:Media_externe:title}">
                                 Média : <strong>{Media:Media_externe:title}</strong><br />
                              </atm-else>
                              <atm-if name="oembedAuthor" what="{Media:Media_externe:authorName} && {Media:Media_externe:authorUrl}">
                                 Auteur : <a href="{Media:Media_externe:authorUrl}" target="_blank"><strong>{Media:Media_externe:authorName}</strong></a><br />
                              </atm-if>
                              <atm-else for="oembedAuthor" what="{Media:Media_externe:authorName}">
                                 Auteur : <strong>{Media:Media_externe:authorName}</strong><br />
                              </atm-else>
                              <atm-if name="oembedSource" what="{Media:Media_externe:providerName} && {Media:Media_externe:providerUrl}">
                                 Source : <a href="{Media:Media_externe:providerUrl}" target="_blank"><strong>{Media:Media_externe:providerName}</strong></a><br />
                              </atm-if>
                              <atm-else for="oembedSource" what="{Media:Media_externe:providerName}">
                                 Source : <strong>{Media:Media_externe:providerName}</strong><br />
                              </atm-else>
                           </p>
                           <atm-if what="{Media:Media_externe:description}">
                              <p>{Media:Media_externe:description}</p>
                           </atm-if>
                           <atm-if what="{Media:Description:value}">
                              <p>{Media:Description:value}</p>
                           </atm-if>
                        </atm-if>
                        <atm-else for="oembed">
                           <div class="right">
                              <atm-if what="{Media:Fichier:filename} && {Media:Fichier:fileExtension} && {Media:Fichier:fileExtension} != 'flv' && {Media:Fichier:fileExtension} != 'mp3' && {Media:Fichier:fileExtension} != 'jpg' && {Media:Fichier:fileExtension} != 'gif' && {Media:Fichier:fileExtension} != 'png'">
                                 <a href="{Media:Fichier:file}" target="_blank" title="Télécharger le document '{Media:label}' ({Media:Fichier:fileExtension} - {Media:Fichier:fileSize}Mo)"><atm-if what="{Media:Fichier:fileIcon}"><img src="{Media:Fichier:fileIcon}" alt="Fichier {Media:Fichier:fileExtension}" /></atm-if> {Media:label}</a>
                                 <atm-if what="{Media:Fichier:thumbname}">
                                    <img src="{Media:Fichier:thumb|200}" alt="{Media:label}" />
                                 </atm-if>
                              </atm-if>
                              <atm-if what="{Media:Fichier:fileExtension} == 'flv'">
                                 <atm-if what="{Media:Fichier:thumbname}">
                                    <script type="text/javascript">
                                       swfobject.embedSWF('automne/playerflv/player_flv.swf', 'media-{Media:id}', '320', '200', '9.0.0', 'automne/swfobject/expressInstall.swf', {flv:'{Media:Fichier:file}', configxml:'automne/playerflv/config_playerflv.xml', startimage:'{Media:Fichier:thumb}'}, {allowfullscreen:true, wmode:'transparent'}, false);
                                    </script>
                                 </atm-if>
                                 <atm-if what="!{Media:Fichier:thumbname}">
                                    <script type="text/javascript">
                                       swfobject.embedSWF('automne/playerflv/player_flv.swf', 'media-{Media:id}', '320', '200', '9.0.0', 'automne/swfobject/expressInstall.swf', {flv:'{Media:Fichier:file}', configxml:'automne/playerflv/config_playerflv.xml'}, {allowfullscreen:true, wmode:'transparent'}, false);
                                    </script>
                                 </atm-if>
                                 <div id="media-{Media:id}" class="pmedia-video" style="width:320px;height:200px;">
                                    <p><a href="http://www.adobe.com/go/getflashplayer" target="_blank"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
                                 </div>
                              </atm-if>
                              <atm-if what="{Media:Fichier:fileExtension} == 'mp3'">
                                 <script type="text/javascript">
                                    swfobject.embedSWF('automne/playermp3/player_mp3.swf', 'media-{Media:id}', '200', '20', '9.0.0', 'automne/swfobject/expressInstall.swf', {mp3:'{Media:Fichier:file}', configxml:'automne/playermp3/config_playermp3.xml'}, {wmode:'transparent'}, false);
                                 </script>
                                 <div id="media-{Media:id}" class="pmedia-audio" style="width:200px;height:20px;">
                                    <p><a href="http://www.adobe.com/go/getflashplayer" target="_blank"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
                                 </div>
                                 <atm-if what="{Media:Fichier:thumbname}">
                                    <img src="{Media:Fichier:thumb|200}" alt="{Media:label}" />
                                 </atm-if>
                              </atm-if>
                              <atm-if what="{Media:Fichier:fileExtension} == 'jpg' || {Media:Fichier:fileExtension} == 'gif' || {Media:Fichier:fileExtension} == 'png'">
                                 <atm-if what="{Media:Fichier:thumbname}">
                                    <a href="{Media:Fichier:file}" rel="atm-enlarge" target="_blank" title="Illustration '{Media:label}' ({Media:Fichier:fileExtension} - {Media:Fichier:fileSize}Mo)"><img src="{Media:Fichier:thumb|200}" alt="{Media:label}" /></a>
                                 </atm-if>
                                 <atm-if what="!{Media:Fichier:thumbname}">
                                    <a href="{Media:Fichier:file}" rel="atm-enlarge" target="_blank" title="Illustration '{Media:label}' ({Media:Fichier:fileExtension} - {Media:Fichier:fileSize}Mo)"><img src="{Media:Fichier:file|200}" alt="{Media:label}" /></a>
                                 </atm-if>
                              </atm-if>
                           </div>
                           <p>
                              <atm-if what="{Media:Fichier:filename}">
                                 Taille : <strong>{Media:Fichier:fileSize}Mo</strong> <atm-if what="{Media:Fichier:fileIcon}"><img src="{Media:Fichier:fileIcon}" alt="Fichier {Media:Fichier:fileExtension}" title="Fichier {Media:Fichier:fileExtension}" /></atm-if><br />
                                 <!-- Télécharger : <a href="#" target="_blank" title="Télécharger le document '{Media:Fichier:fileLabel}' ({Media:Fichier:fileExtension} - {Media:Fichier:fileSize}Mo)"><strong>{Media:label}</strong></a><br /> -->
                              </atm-if>
                              <atm-if what="{Media:Description:value}">
                                 {Media:Description:value}
                              </atm-if>
                           </p>
                        </atm-else>
                        <div class="clear"></div>
                     </div>
                  </div>
                  <atm-if what="{maxresults}>10 && {lastresult} && !{request:int:item}">
                     <div class="pmedia-pages">
                        <atm-function function="pages" maxpages="{maxpages}" currentpage="{currentpage}" displayedpage="5">
                           <pages>
                              <a href="{page:self:url}?keyword={request:string:keyword}&category={request:string:category}&page={n}">{n}</a>
                           </pages>
                           <currentpage>
                              <strong>{n}</strong>
                           </currentpage>
                           <previous>
                              <a href="{page:self:url}?keyword={request:string:keyword}&category={request:string:category}&page={n}">Page précédente</a> 
                           </previous>
                           <next>
                              <a href="{page:self:url}?keyword={request:string:keyword}&category={request:string:category}&page={n}">Page suivante</a> 
                           </next>
                        </atm-function> 
                     </div>
                  </atm-if>
                  <atm-if what="{lastresult}">
                     <atm-end-tag tag="div" />
                  </atm-if>
               </atm-result>
               <atm-noresult search="mediaresult">
                  <div class="pmedia-results">
                     Aucun résultat trouvé pour votre recherche ...
                  </div>
               </atm-noresult>
            </atm-search>
      </atm-xml>
   </div>
</block>
</row>
Les deux lignes suivantes me permettent de définir le mot clé et le type de catégorie, mais il m'affiche à chaque fois les audios et les vidéos dans la même
rangée.
Code :
<atm-search-param search="mediaresult" type="keywords" value="oumako" mandatory="false" />
<atm-search-param search="mediaresult" type="pmedia-category" value="Vidéo" mandatory="false" />
Avez -vous une idée pour résoudre ce souci?