Photo Galleries (Photo Gallery Helper)

@BRT.PhotoGallery(directory:"galleries",
showDirectories: true, width:250, height:150, 
template:
@<div>
    @if (!String.IsNullOrEmpty(Request.QueryString["gallery"])){
        <h1>@item.GalleryTitle</h1>
    } else {
        <h1>@Title</h1>
    }
    @foreach(PhotoGalleryHelperExtensions.DirectoryFile file in item.Files) {
        if(file.IsDirectory != true){
            <a href="@file.URL" target="_blank"><img src="@file.Image" alt="@file.Title" class="img-thumbnail" /></a>
            <p>@file.Title</p>
            <p>@file.Description</p>
        }
        else{
            <h4>
                <a href="?gallery=@file.URL">
                    @if(@file.Title!=""){
                    @file.Title}
                    else{ @file.Filename}                 
                </a>
            </h4>
            <p>@file.Description</p>
            <hr/>
        }
    }
</div>)