[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/components/com_content/views/category/tmpl/ -> blog.php (source)

   1  <?php // no direct access
   2  defined('_JEXEC') or die('Restricted access');
   3  $cparams =& JComponentHelper::getParams('com_media');
   4  ?>
   5  <?php if ($this->params->get('show_page_title', 1)) : ?>
   6  <div class="componentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
   7      <?php echo $this->escape($this->params->get('page_title')); ?>
   8  </div>
   9  <?php endif; ?>
  10  <table class="blog<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" cellpadding="0" cellspacing="0">
  11  <?php if ($this->params->def('show_description', 1) || $this->params->def('show_description_image', 1)) :?>
  12  <tr>
  13      <td valign="top">
  14      <?php if ($this->params->get('show_description_image') && $this->category->image) : ?>
  15          <img src="<?php echo $this->baseurl . '/' . $cparams->get('image_path') . '/'. $this->category->image;?>" align="<?php echo $this->category->image_position;?>" hspace="6" alt="" />
  16      <?php endif; ?>
  17      <?php if ($this->params->get('show_description') && $this->category->description) : ?>
  18          <?php echo $this->category->description; ?>
  19      <?php endif; ?>
  20          <br />
  21          <br />
  22      </td>
  23  </tr>
  24  <?php endif; ?>
  25  <?php if ($this->params->get('num_leading_articles')) : ?>
  26  <tr>
  27      <td valign="top">
  28      <?php for ($i = $this->pagination->limitstart; $i < ($this->pagination->limitstart + $this->params->get('num_leading_articles')); $i++) : ?>
  29          <?php if ($i >= $this->total) : break; endif; ?>
  30          <div>
  31          <?php
  32              $this->item =& $this->getItem($i, $this->params);
  33              echo $this->loadTemplate('item');
  34          ?>
  35          </div>
  36      <?php endfor; ?>
  37      </td>
  38  </tr>
  39  <?php else : $i = $this->pagination->limitstart; endif; ?>
  40  
  41  <?php
  42  $startIntroArticles = $this->pagination->limitstart + $this->params->get('num_leading_articles');
  43  $numIntroArticles = $startIntroArticles + $this->params->get('num_intro_articles');
  44  if (($numIntroArticles != $startIntroArticles) && ($i < $this->total)) : ?>
  45  <tr>
  46      <td valign="top">
  47          <table width="100%"  cellpadding="0" cellspacing="0">
  48          <tr>
  49          <?php
  50              $divider = '';
  51              if ($this->params->def('multi_column_order', 0)) : // order across, like front page
  52                  for ($z = 0; $z < $this->params->def('num_columns', 2); $z ++) :
  53                      if ($z > 0) : $divider = " column_separator"; endif; ?>
  54                      <?php
  55                      $rows = (int) ($this->params->get('num_intro_articles', 4) / $this->params->get('num_columns'));
  56                      $cols = ($this->params->get('num_intro_articles', 4) % $this->params->get('num_columns'));
  57                      ?>
  58                      <td valign="top"
  59                          width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%"
  60                          class="article_column<?php echo $divider ?>">
  61                          <?php
  62                          $loop = (($z < $cols)?1:0) + $rows;
  63  
  64                          for ($y = 0; $y < $loop; $y ++) :
  65                              $target = $i + ($y * $this->params->get('num_columns')) + $z;
  66                              if ($target < $this->total && $target < ($numIntroArticles)) :
  67                                  $this->item =& $this->getItem($target, $this->params);
  68                                  echo $this->loadTemplate('item');
  69                              endif;
  70                          endfor;
  71                          ?></td>
  72                  <?php endfor; 
  73                          $i = $i + $this->params->get('num_intro_articles') ; 
  74              else : // otherwise, order down, same as before (default behaviour)
  75                  for ($z = 0; $z < $this->params->get('num_columns'); $z ++) :
  76                      if ($z > 0) : $divider = " column_separator"; endif; ?>
  77                      <td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>">
  78                      <?php for ($y = 0; $y < ($this->params->get('num_intro_articles') / $this->params->get('num_columns')); $y ++) :
  79                      if ($i < $this->total && $i < ($numIntroArticles)) :
  80                          $this->item =& $this->getItem($i, $this->params);
  81                          echo $this->loadTemplate('item');
  82                          $i ++;
  83                      endif;
  84                  endfor; ?>
  85                  </td>
  86          <?php endfor; 
  87          endif; ?> 
  88          </tr>
  89          </table>
  90      </td>
  91  </tr>
  92  <?php endif; ?>
  93  <?php if ($this->params->get('num_links') && ($i < $this->total)) : ?>
  94  <tr>
  95      <td valign="top">
  96          <div class="blog_more<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
  97              <?php
  98                  $this->links = array_splice($this->items, $i - $this->pagination->limitstart);
  99                  echo $this->loadTemplate('links');
 100              ?>
 101          </div>
 102      </td>
 103  </tr>
 104  <?php endif; ?>
 105  <?php if ($this->params->get('show_pagination')) : ?>
 106  <tr>
 107      <td valign="top" align="center">
 108          <?php echo $this->pagination->getPagesLinks(); ?>
 109          <br /><br />
 110      </td>
 111  </tr>
 112  <?php endif; ?>
 113  <?php if ($this->params->get('show_pagination_results')) : ?>
 114  <tr>
 115      <td valign="top" align="center">
 116          <?php echo $this->pagination->getPagesCounter(); ?>
 117      </td>
 118  </tr>
 119  <?php endif; ?>
 120  </table>


Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1