carlosx2 Posted May 18, 2010 Share Posted May 18, 2010 hi all , I am trying to recode the whole blog front page. What i would like to do is that i have like 15 articles show up as updates and then the rest of the articles below it. I just don't know how to tell them appart. How have they done this. I know some scripts say like list 1 to many or 1to 5 and then continue with 6 to many or something like this. But i have no idea how joomla does this and where to find this. I can also not see on this place where blog_item is being called in this script. <table class="blog<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" cellpadding="0" cellspacing="0"> <?php if ($this->params->def('show_description', 1) || $this->params->def('show_description_image', 1)) :?> <tr> <td valign="top"> <?php if ($this->params->get('show_description_image') && $this->section->image) : ?><img src="<?php echo $this->baseurl . '/' . $cparams->get('image_path') . '/'. $this->section->image;?>" align="<?php echo $this->section->image_position;?>" hspace="6" alt="" /><?php endif; ?> <?php if ($this->params->get('show_description') && $this->section->description) : ?> <?php echo $this->section->description; ?> <?php endif; ?><br /> <br /> </td> </tr> <?php endif; ?> <?php if ($this->params->def('num_leading_articles', 1)) : ?> <tr> <td valign="top"> <?php for ($i = $this->pagination->limitstart; $i < ($this->pagination->limitstart + $this->params->get('num_leading_articles')); $i++) : ?> <?php if ($i >= $this->total) : break; endif; ?> <div> <?php $this->item =& $this->getItem($i, $this->params); echo $this->loadTemplate('item'); ?></div> <?php endfor; ?></td> </tr> <?php else : $i = $this->pagination->limitstart; endif; ?> <?php $startIntroArticles = $this->pagination->limitstart + $this->params->get('num_leading_articles'); $numIntroArticles = $startIntroArticles + $this->params->get('num_intro_articles', 4); if (($numIntroArticles != $startIntroArticles) && ($i < $this->total)) : ?> <tr> <td valign="top"> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <?php $divider = ''; if ($this->params->def('multi_column_order', 0)) : // order across, like front page for ($z = 0; $z < $this->params->def('num_columns', 2); $z ++) : if ($z > 0) : $divider = " column_separator"; endif; ?> <?php $rows = (int) ($this->params->get('num_intro_articles', 4) / $this->params->get('num_columns')); $cols = ($this->params->get('num_intro_articles', 4) % $this->params->get('num_columns')); ?> <td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>"> <?php $loop = (($z < $cols)?1:0) + $rows; for ($y = 0; $y < $loop; $y ++) : $target = $i + ($y * $this->params->get('num_columns')) + $z; if ($target < $this->total && $target < ($numIntroArticles)) : $this->item =& $this->getItem($target, $this->params); echo $this->loadTemplate('item'); endif; endfor; ?></td> <?php endfor; $i = $i + $this->params->get('num_intro_articles', 4) ; else : // otherwise, order down, same as before (default behaviour) for ($z = 0; $z < $this->params->get('num_columns'); $z ++) : if ($z > 0) : $divider = " column_separator"; endif; ?> <td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>"> <?php for ($y = 0; $y < ($this->params->get('num_intro_articles', 4) / $this->params->get('num_columns')); $y ++) : if ($i < $this->total && $i < ($numIntroArticles)) : $this->item =& $this->getItem($i, $this->params); echo $this->loadTemplate('item'); $i ++; endif; endfor; ?></td> <?php endfor; endif; ?> </tr> </table> </td> </tr> <?php endif; ?> <?php if ($this->params->def('num_links', 4) && ($i < $this->total)) : ?> <tr> <td valign="top"> <div class="blog_more<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>"> <?php $this->links = array_splice($this->items, $i - $this->pagination->limitstart); echo $this->loadTemplate('links'); ?></div> </td> </tr> <?php endif; ?> <?php if ($this->params->def('show_pagination', 2)) : ?> <tr> <td valign="top" align="center"> <?php echo $this->pagination->getPagesLinks(); ?><br /><br /> </td> </tr> <?php endif; ?> <?php if ($this->params->def('show_pagination_results', 1)) : ?> <tr> <td valign="top" align="center"> <?php echo $this->pagination->getPagesCounter(); ?></td> </tr> <?php endif; ?> </table> that is part of the blog.php of joomla 1.5. Maybe some can point me in the right direction on how they put this together. How they call content, determent when it should show up. I know all the info is in the database but how do they call it etc. Hope some one can shine some light on my issue. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.