Hi
I know that the developers have enough to do and help with theming isn't your top priority. Understandingly, but if anyone can nudge me in the right direction I would appreciate.
I'm trying to get the two next_album and next_news loops fit together on my index page. I managed it in a way:
http://trondheimkunsthall.com/I want albums and news to descend _together_ after published date though. Now the 10 last texts come first (as set at the zenpage plugin in admin-options.php?page=options&tab=plugin) and then the 10 last albums (as set in admin-options.php&tab=theme).
I am wondering: Where are the next_album and next_news functions declared?
My code is like this:
`
<?php while (next_news()): ;?>
<?php printNewsTitleLink(); ?><?php echo " <span class='newstype'>[tekster]"; ?>
<?php printNewsDate();?> | <?php echo gettext("Comments:"); ?> <?php echo getCommentCount(); ?> | <?php printNewsCategories(", ",gettext("Categories: "),"newscategories"); ?>
<?php echo getNewsContent(200); ?>
<?php endwhile; ?>
<?php while (next_album()): ?>
<?php printAlbumDate(""); ?>
<?php echo truncate_string(getAlbumDesc(), 45); ?>
<?php endwhile; ?>
`
There is also another problem:
If I push the next page link, the first loop disappares. I must confess I don't understand how printPageListWithNav works either, because I recond it is there this other problem lies. Where is printPageListWithNav declared? (Maybe "declared" isn't the right word, I mean where is the code for the three functions.)
Comments
The second problem is that you only have four news items published. Once all four of the news items have been printed to the first page, there are no more for any other pages. So say that you have 12 news items instead of four. If you had 12, you would see ten on the first page and two on the second page. On the third page, you would not have any news items left.
FYI, `next_album()` is defined in `zp-core/template-functions.php` and `next_news()` is defined in `zp-core/plugins/zenpage/zenpage-template-functions.php`. `printPageListWithNav()` is also defined in `zp-core/template-functions.php`. All the Zenphoto functions can be found in the User Guide on the Zenphoto website, though it's suggested not to modify any of the core functions.
`
<? $i=1;
while ($i<=8):
if (next_newsDate() < next_albumDate())
{
next_news(); $i++; ?>
<? }
else
{
next_album(); $i++; ?>
<? }
endwhile; ?>
`
Maybe you should explain what you are actually trying to do?
Anyway, I have just made a new front page instead. It's more easy to plot in the html manually until I'm better in php.