Member
Member
n20capri   2009-11-26, 01:52
#1
I'd like to display all the articles in my news section on my sidebar - currently my sidebar just shows 1 link to "All Articles".

I'd like to show all of them - as links to each actual article. Like how the stock "pages" sidebar area is setup as a list...I've searched and all the help documentation links posted go "pages not found"

Thanks,
Mike
Member
Member
BertSimons   2009-11-26, 06:41
#2
I have put a list of the 10 latest articles (without page-navigation) on my index.php, instead of 10 you can put a higher number in the second last line.. could work in the sidebar too

`
<?php //latest 10 news articles loop on index.php
$x = 1; while (next_news()):?>
<div class="newsarticle">
<a href ="/zenphoto/news/<?php echo getNewsTitleLink();?>">
<?php echo getNewsTitle();?></a>
<div>
<?php if ($x++ >=10) { break;} endwhile; ?>
`
Administrator
Administrator
acrylian   2009-11-26, 10:24
#3
@n20capri: It is not really hard to find the documentation on our site's user guide, is it???

For the latest x articles there is also `printLatestNews()`. If you really want to get all articles you have to use `getNewsArticles()` and do a custom loop.

Please see the documentation for detailed info.
Member
Member
n20capri   2009-11-26, 14:27
#4
Much appreciated Bert thanks!
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.