OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / templates / art30_041_sample2 / html / com_content / featured / default.php
1 <?php
2
3 /**
4  * Overwrites default template of the content/featured component of Joomla 1.6.
5  * Joomla 1.6 content/featured supplants Joomla 1.5 content/frontpage.
6  */
7
8 defined('_JEXEC') or die;
9
10 require_once dirname(__FILE__) . str_replace('/', DIRECTORY_SEPARATOR, '/../../../functions.php');
11
12 $view = new ArtxContent16($this, $this->params);
13
14 echo $view->beginPageContainer('blog-featured');
15 if ($view->showPageHeading)
16     echo $view->pageHeading();
17 ?>
18 <?php $leadingcount = 0; ?>
19 <?php if (!empty($this->lead_items)) : ?>
20 <div class="items-leading">
21 <?php foreach ($this->lead_items as &$item) : ?>
22 <div class="leading-<?php echo $leadingcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>">
23 <?php
24         $this->item = &$item;
25         echo $this->loadTemplate('item');
26 ?>
27 </div>
28 <?php $leadingcount++; ?>
29 <?php endforeach; ?>
30 </div>
31 <?php endif; ?>
32 <?php
33         $introcount = count($this->intro_items);
34         $counter = 0;
35 ?>
36 <?php if (!empty($this->intro_items)) : ?>
37 <?php foreach ($this->intro_items as $key => &$item) : ?>
38 <?php
39         $key = ($key - $leadingcount) + 1;
40         $rowcount = (((int)$key - 1) % (int)$this->columns) + 1;
41         $row = $counter / $this->columns;
42         if ($rowcount == 1) :
43 ?>
44 <div class="items-row cols-<?php echo (int) $this->columns; ?> <?php echo 'row-' . $row; ?>">
45 <?php endif; ?>
46 <div class="item column-<?php echo $rowcount;?><?php echo $item->state == 0 ? ' system-unpublished"' : null; ?>">
47 <?php
48         $this->item = &$item;
49         echo $this->loadTemplate('item');
50 ?>
51 </div>
52 <?php $counter++; ?>
53 <?php if ($rowcount == $this->columns || $counter == $introcount): ?>
54 <span class="row-separator"></span>
55 </div>
56 <?php endif; ?>
57 <?php endforeach; ?>
58 <?php endif; ?>
59 <?php if (!empty($this->link_items)) : ?>
60 <?php ob_start(); ?>
61 <div class="items-more">
62 <?php echo $this->loadTemplate('links'); ?>
63 </div>
64 <?php echo artxPost(ob_get_clean()); ?>
65 <?php endif; ?>
66 <?php if ($this->params->def('show_pagination', 2) == 1  || ($this->params->get('show_pagination') == 2 && $this->pagination->get('pages.total') > 1)) : ?>
67 <?php ob_start(); ?>
68 <div class="pagination">
69 <?php if ($this->params->def('show_pagination_results', 1)) : ?>
70 <p class="counter"><?php echo $this->pagination->getPagesCounter(); ?></p>
71 <?php endif; ?>
72 <?php echo $this->pagination->getPagesLinks(); ?>
73 </div>
74 <?php echo artxPost(ob_get_clean()); ?>
75 <?php endif; ?>
76 <?php echo $view->endPageContainer(); ?>