Support » Plugins » [Plugin: NextGEN Gallery] Menu List for Albums and Galleries

  • nktm

    (@nktm)


    How would I go about adding a hierarchical menu list of albums/galleries. I don’t want any images, just a link to the page…is there a widget that can do this?

    Such that:
    Album 1
    -GalleryA
    -GalleryB
    Album 2
    -GalleryC
    etc…

    Simply put, what I am looking for is a way to create a dynamic menu for a gallery template for ease of navigation between Albums/Galleries

Viewing 11 replies - 1 through 11 (of 11 total)
  • Anyone? I want to know this too.

    There is one who want know this too.

    I did a new album template album-list.php and it was like this:

    <?php
    /**
    Template Page for the list of albums
    
    Follow variables are useable :
    
    	$album     	 : Contain information about the album
    	$galleries   : Contain all galleries inside this album
    	$pagination  : Contain the pagination content
    
     You can check the content when you insert the tag <?php var_dump($variable) ?>
     If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
    **/
    ?>
    
    <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($galleries)) : ?>
    
    <h4><?php echo $album->name ?></h2>
    <ul class="albumit">
    	<!-- List of galleries -->
    	<?php foreach ($galleries as $gallery) : ?>
    		<li><a class="Link" href="<?php echo $gallery->pagelink ?>"><?php echo $gallery->title ?></a></li>
     	<?php endforeach; ?>
    </ul>
    <?php endif; ?>

    Then I put do_shortcode-function to my sidebar. Like this:

    echo do_shortcode('[album id=5 template=list]');

    Thats working, but in gallery-page it returns nothing. And just on gallery-page I need the hierarchical menu list of albums/galleries 🙁

    Can anyone help?

    Anything new about this?

    hi! I am not sure if this is what you are trying to accomplish but have you tried using [album id=1 template=extend ]? Here is an explanation on this. http://nextgen.boelinger.com/album/ Hope this helps.

    I’m currently using the album template and gallery template as well. I would also like to see the ability to list all albums on one page. It would function similar to how galleries are listed.

    Someone would need to write a custom query to access the albums from the nextgen tables in the database. Anybody up for the challenge?

    Hey Guys,

    I think I found the answer: Subalbums!

    Step 1: Create an album. This one will act as the “master” album.
    Step 2: Create more albums. These will act as “subalbums” that will actually be displayed
    Step 3: Select the “master” album in the Album admin.
    Step 4: Drag all “subalbums” into the master album.
    Step 5: Save/Update the master album.
    Step 6: Create a “master” album template that lists the albums and galleries

    I’m trying it out now.

    I think there should be the shortcode for listing all the albums…

    I agree. Most of the time I just want to list all galleries on one page. Currently I’ve created one album and instructed the client to add each gallery to that album. But it’s an extra step that could be avoided if I could simply list everything with a template tag.

    Any progress on this item?
    I would really like to know how to do this…..

    This is a hack really, but I wanted a quick solution.

    This will put the title of each gallery in an array:

    <?php
    
    	$galleries = array();
    	$query = "SELECT * FROM wp_ngg_gallery WHERE gid";
            $result = mysql_query($query) or die(mysql_error());
    
    while($row = mysql_fetch_array($result)){
    	$galleries[] = $row['title'];
    }

    This will echo links to each gallery. page_id will be specific to your wordpress install.

    <?php
    	$i = 1;
    	foreach ($galleries as &$value) {
    		echo '<a href="/?page_id=61&album=1&gallery='.$i.'">'.$value.'</a>';
    		$i++;
    	}
    
    ?>

    You may have to surround wp_ngg_gallery and gid with tick marks. I tried but the forum here replaced them with code tags.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: NextGEN Gallery] Menu List for Albums and Galleries’ is closed to new replies.