Gallery-based side navigation

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
tufahija
Forum Members
Forum Members
Posts: 46
Joined: Fri Aug 07, 2009 3:37 pm

Gallery-based side navigation

Post by tufahija »

Has anyone already made or has some good thoughts on how to make a side navigation that follows the albums? So far I have made a UDT that reads the first level albums and creates a sub-navigation, but I need to make it work for all levels.

Here's the example site: http://sinnbilder-schmidt.de.www103.nur ... otografie/
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: Gallery-based side navigation

Post by JohnnyB »

I didn't work out the PHP, but have done something similar using scandir() and readdir() for a parent directory. So, maybe loop through the parent Gallery directory and set everything into a list.

Code: Select all

$files = array();
$dir=opendir("uploads/images/Gallery");
while(($file = readdir($dir)) !== false) {
	if($file !== '.' && $file !== '..') {
		$files[] = $file;
	}
}
closedir($dir);

for($i=0; $i<count($files); $i++) {
if($files[$i] != ".htaccess" && $files[$i] != "index.php")
echo '<a href="uploads/slides/'.$files[$i].'">'.$files[$i].'</a>;
}
I'm not sure that will be recursive but maybe get you started.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
Post Reply

Return to “Modules/Add-Ons”