22/05/2012, 15:43:06
Si je remet le gabarit fourni avec le module à savoir :
J'ai bien que mes trois news.
Par contre avec mon gabarit modifier et bien ça fonctionne pas
Code :
[== HTML ==]
<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>
{if $itemcount > 0}
<div id="container">
<div id="example">
<div id="slides">
<div class="slides_container">
{foreach from=$items item=entry}
<div class="slide">
{if $entry->postdate}
<div class="NewsSummaryPostdate">
{$entry->postdate|cms_date_format}
</div>
{/if}
<div class="NewsSummaryLink">
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a>
</div>
{if $entry->summary}
<div class="NewsSummarySummary">
{eval var=$entry->summary}
</div>
<div 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}: {eval var=$field->value}
{/if}
</div>
{/foreach}
{/if}
</div>
{/foreach}
<!-- End News Display Template -->
</div>
<a href="#" class="prev"><img src="modules/NewsSlides/Linking/img/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
<a href="#" class="next"><img src="modules/NewsSlides/Linking/img/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>
{/if}
J'ai bien que mes trois news.
Par contre avec mon gabarit modifier et bien ça fonctionne pas
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: false,
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>
{if $itemcount > 0}
<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; font-size:x-small;" 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 class="NewsSummaryMorelink">
<a href="{$entry->moreurl}"><img src="uploads/images/slideNews/detail.png" width="38px" height="21px" alt="Voir la news {$entry->title}"</a>
</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}: {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>
{/if}