Can printAlbumMenu / print_album_menu be horizontal?

Hi,

Is there any way to format the printalbummenu function so that it creates a horizontal navigation list, rather than a vertical list?

Thanks!

Comments

  • one other question-

    I have the following code as another way to make a horizontal nav menu. How could I make it so the last menu title doesnt have the "|" character on it? ex of how it currently looks: 1 | 2 | 3 | 4 |

    `
    <?php while (next_album()): ?>
    " title="View album: <?php echo getAlbumTitle();?>"><?php printAlbumTitle(); ?>   |   
    <?php endwhile; ?>
    `
  • acrylian Administrator, Developer
    1. That is possible. The album menu prints a unordered html list (which is semantic for menus) that you can style via CSS to be horizontally. Please try a web search on that, there are plenty of tutorials.

    2. Try something like `if(next_album()) { echo " | "; }`
  • When I inserted the statement as:
    `
    <?php while (next_album()): ?>
    " title="View album: <?php echo getAlbumTitle();?>"><?php printAlbumTitle(); ?>   |   
    <?php if(next_album()) { echo " | "; }?>
    <?php endwhile; ?>
    `
    it printed an endless navigation list (browser crash, oops)

    How would I write that correctly, so it inserts a | only if there is another album?
    This I know I wrote incorrectly, but improving on understanding..
    `
    <?php while (next_album()): ?>
    " title="View album: <?php echo getAlbumTitle();?>"><?php printAlbumTitle(); ?>   |   
    <?php if(next_album()) { echo " | "; }?>
    <?php else(next_album()) {echo 'null' };} ?> <?php endwhile; ?>
    `
    Thanks for your help!
  • Your test should be `if (is_null(getNextAlbum()) { echo 'null'; } else { echo | ; }`
  • this is the final code i used

    `<?php if (is_null(getNextAlbum())) { echo null; } else { echo " | " ; } ?>`

    thank you so much for your help
Sign In or Register to comment.