G2 Front Page only latest post & not albums

allin1.co.in

Joined: 2012-03-22
Posts: 4
Posted: Thu, 2012-03-29 15:59

How to show in my Front Page only the latest post (new images added) & not albums

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2012-03-29 20:26

There is no one-click way of achieving this.

There would be editing templates and php files.

Something like:

  • set the default album in gallery2/config.php
    $gallery->setConfig('defaultAlbumId', 30);// where 30 is the id of the album you want as default
    
  • then in your gallery2/themes/your theme/templates/local/theme.tpl template have a redirect to ?g2_view=dynamicalbum.RandomAlbum if in album 30:
    {if $theme.item.id == 30}
    {php}header("Location: /gallery2/main.php?g2_view=dynamicalbum.RandomAlbum");{/php}
    {/if}
    

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2