Sujet fermé
Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5

[Résolu]Le retour de ma balise qui liste les fichiers d'un dossier
#25

Non celui des news, pour l'afficage des news (je passe du "coq à l'âne" désolé).
Code :
[== Indéfini ==]
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
    <script src="modules/NewsSlides/Linking/js/slides.min.jquery.js"></script>

    <script>
{literal}
        $(function(){
            // Set starting slide to 1
            var startSlide = 1;
            // Get slide number if it exists
            if (window.location.hash) {
                startSlide = window.location.hash.replace('#','');
            }
            // Initialize Slides
            $('#slides').slides({
                preload: true,
                preloadImage: 'modules/NewsSlides/Linking/img/loading.gif',
                generatePagination: true,
                play: 5000,
                pause: 2500,
                hoverPause: true,
                // Get the starting slide
                start: startSlide,
                animationComplete: function(current){
                    // Set the slide number as a hash
                    window.location.hash = '#' + current;
                }
            });
        });
{/literal}
    </script>
<div id="container">
         <div id="example">
               <div id="slides">
            <div class="slides_container">
{foreach from=$items item=entry}
<div class="slide">


<div style="font-weight:bold;" class="NewsSummaryLink">
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a>
</div>

{if $entry->postdate}
    <div style="font-size:x-small;" class="NewsSummaryPostdate">
        {$entry->postdate|cms_date_format}
    </div>
{/if}

{if $entry->summary}
    <div style="font-size:x-small;" class="NewsSummarySummary">
        {eval var=$entry->summary}
    </div>

    <div style="font-size:xx-small" class="NewsSummaryMorelink">
        [{$entry->morelink}]
    </div>

{else if $entry->content}

    <div class="NewsSummaryContent">
        {eval var=$entry->content}
    </div>
{/if}

{if isset($entry->extra)}
    <div class="NewsSummaryExtra">
        {eval var=$entry->extra}
    {* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}
    </div>
{/if}
{if isset($entry->fields)}
  {foreach from=$entry->fields item='field'}
     <div class="NewsSummaryField">
        {if $field->type == 'file'}
          <img src="{$entry->file_location}/{$field->value}"/>
        {else}
          {$field->name}:&nbsp;{eval var=$field->value}
        {/if}
     </div>
  {/foreach}
{/if}

</div>
{/foreach}
<!-- End News Display Template -->
</div>
                <a href="#" class="prev"><img src="uploads/images/slideNews/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
                <a href="#" class="next"><img src="uploads/images/slideNews/arrow-next.png" width="24" height="43" alt="Arrow Next"></a>
            </div>
            <img src="modules/NewsSlides/Linking/img/example-frame.png" width="539" height="341" alt="Example Frame" id="frame">
        </div>
                   </div>

Penses tu que je peux intégrer les tests que tu m'as montré directement dans ce gabarit ?
Code :
[== Indéfini ==]
{if $itemcount > 0}

Comme ça j'aurais :
Code :
[== Indéfini ==]
{page_attr key="extra1" assign=ex1}
{if $ex1 ne ''}
{news number='3' category=$ex1 detailpage='info-actu' summarytemplate='slide_01' lang='fr_FR'}
{/if}

Mais je sais pas si ça va marcher par rapport à la catégorie...

Cool
Sujet fermé


Messages dans ce sujet

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)