13/07/2012, 02:08:07
Bonjour,
Evidemment j'ai deux blocs sur ma page d'accueil, un qui contient la balise marquee pour mes flash info defilantes et un autre qui contient le NewsSlider.
Voici mes differents gabarits pour le news :
Je reste à l'ecoute
Evidemment j'ai deux blocs sur ma page d'accueil, un qui contient la balise marquee pour mes flash info defilantes et un autre qui contient le NewsSlider.
Voici mes differents gabarits pour le news :
- Bloc avec balise marquee
Code :
[== Indéfini ==]
<!-- Start News Display Template -->
{* This section shows a clickable list of your News categories. *}
<!--
<ul class="list1">
{foreach from=$cats item=node}
{if $node.depth > $node.prevdepth}
{repeat string="<ul>" times=$node.depth-$node.prevdepth}
{elseif $node.depth < $node.prevdepth}
{repeat string="</li></ul>" times=$node.prevdepth-$node.depth}
</li>
{elseif $node.index > 0}</li>
{/if}
<li{if $node.index == 0} class="firstnewscat"{/if}>
{if $node.count > 0}
<a href="{$node.url}">{$node.news_category_name}</a>{else}<span>{$node.news_category_name} </span>{/if}
{/foreach}
{repeat string="</li></ul>" times=$node.depth-1}</li>
</ul>
{* this displays the category name if you're browsing by category *}
{if $category_name}
<h1>{$category_name}</h1>
{/if}
-->
{* if you don't want category browsing on your summary page, remove this line and everything above it *}
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</p>
{/if}
{foreach from=$items item=entry}
<div class="NewsSummary">
<br/>
<hr/>
<strong>
{if $entry->postdate}
<div class="NewsSummaryPostdate">
{$entry->postdate|cms_date_format}
</div>
{/if}
</strong>
<div class="NewsSummaryLink">
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a>
</div>
<br/>
<br/>
<!--
<div class="NewsSummaryCategory">
{$category_label} {$entry->category}
</div>
{if $entry->author}
<div class="NewsSummaryAuthor">
{$author_label} {$entry->author}
</div>
{/if}
-->
{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 -->
- Bloc NewsSlider
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">
{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>
<!--
<div class="NewsSummaryCategory">
{$category_label} {$entry->category}
</div>
{if $entry->author}
<div class="NewsSummaryAuthor">
{$author_label} {$entry->author}
</div>
{/if}
-->
<br/>
{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="739" height="341" alt="Example Frame" id="frame">
</div>
</div>
Je reste à l'ecoute