1 | {define_derivative name='carousel' width='300' height='300' min_width='300'} |
---|
2 | {php} |
---|
3 | global $page, $template; |
---|
4 | $template->assign('cat_name', $page['category']['name']); |
---|
5 | |
---|
6 | {/php} |
---|
7 | |
---|
8 | |
---|
9 | <div id="carousel"> |
---|
10 | <div id="wrap"> |
---|
11 | <div class="jcarousel"> |
---|
12 | <ul> |
---|
13 | {if !empty($category_thumbnails)} |
---|
14 | {foreach from=$category_thumbnails item=cat} |
---|
15 | <li> |
---|
16 | <div class="illustration"> |
---|
17 | <a href="{$cat.URL}"> |
---|
18 | <img src="{$pwg->derivative_url($carousel, $cat.representative.src_image)}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}" min-width="{$carousel->max_width()}" height="{$carousel->max_height()-22}"/> |
---|
19 | </a> |
---|
20 | </div> |
---|
21 | <div class="CatMPdescription"> |
---|
22 | <h3> |
---|
23 | <a href="{$cat.URL}">{$cat.NAME}</a> |
---|
24 | </h3> |
---|
25 | <div> |
---|
26 | {$cat.CAPTION_NB_IMAGES} |
---|
27 | </div> |
---|
28 | </div> |
---|
29 | </li> |
---|
30 | {/foreach} |
---|
31 | {/if} |
---|
32 | {foreach from=$thumbnails item=thumbnail} |
---|
33 | {assign var=derivative value=$pwg->derivative($carousel, $thumbnail.src_image)} |
---|
34 | <li> |
---|
35 | <div class="illustration"> |
---|
36 | <a href="{if ($Slim.style_slim)!=3}{$thumbnail.path}" class="lytebox" rev="slide:true group:name showNavigation:true navType:1 slideInterval:6000"{else}{$thumbnail.URL}"{/if} title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'''|replace:'"':'"'}"> |
---|
37 | <img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" height="{$carousel->max_height()-22}"/> |
---|
38 | {if $SHOW_THUMBNAIL_CAPTION } |
---|
39 | <div class="CatMPdescription"> |
---|
40 | <H3> |
---|
41 | {$thumbnail.NAME} |
---|
42 | {if !empty($thumbnail.icon_ts)} |
---|
43 | <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)"> |
---|
44 | {/if} |
---|
45 | </h3> |
---|
46 | {if isset($thumbnail.NB_COMMENTS) or isset($thumbnail.NB_HITS)} |
---|
47 | <div> |
---|
48 | {if isset($thumbnail.NB_COMMENTS)} |
---|
49 | <p class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments"> |
---|
50 | {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)} |
---|
51 | </p> |
---|
52 | {/if} |
---|
53 | {if isset($thumbnail.NB_HITS)} |
---|
54 | <p class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits"> |
---|
55 | {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)} |
---|
56 | </p> |
---|
57 | {/if} |
---|
58 | </div> |
---|
59 | {/if} |
---|
60 | </div> |
---|
61 | {/if} |
---|
62 | </a> |
---|
63 | </div> |
---|
64 | </li> |
---|
65 | {/foreach} |
---|
66 | </ul> |
---|
67 | </div> |
---|
68 | </div> |
---|
69 | <a href="#" class="jcarousel-control-prev">‹</a> |
---|
70 | <a href="#" class="jcarousel-control-next">›</a> |
---|
71 | </div> |
---|