Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Andy Macaulay-Brook

    (@andymacb)

    Just a quick bump of my question now I’ve set the tag to nextgen-gallery. Ta.

    [gallery id=x template=name] this is the syntax for the galleries

    Thread Starter Andy Macaulay-Brook

    (@andymacb)

    Ah yes – I know that, but thanks for the reply Alex.

    What I am doing is embedding an album, choosing a template with the [album] shortcode.

    My question is, is there then a way of applying a template to the galleries linked to by that album?

    Thanks.

    forposts

    (@forposts)

    I may suggest you quick fix

    Patch the line 285 in nggfunctions.php
    remove:
    $out = nggShowGallery($galleryID);

    insert:
    $out = nggShowGallery($galleryID, $template);

    You have to place gallery-extend.php template in “view” folder if you use [album id=1 template=extend]
    I simply copied gallery-caption.php to gallery-extend.php

    big help, works like a wet dream!

    Ive been wondering how to do the same thing without having over overwrite the default gallery in the templates dir. The fix suggested will work however it means we need to keep patching with future updates. Alex can put in the proposed fix in because this would break existing installations since gallery-extend and gallery-compact does not exist.

    Alex, what are you thoughts on this? Any chance you can come up with a fix for this in the future releases? One possible solution to this could be something like this

    [album id=x template=blah gallerytemplate=blah]

    This would not break anything while providing the desired functionality

    Yes indeed this is a problem, but I don’t want to add more and more parameters as the shortcode parameter list is already very long… I need to think about it to make this chnage compatible with the existing solution

    Would it make sense to make a copy of the album template like you would any other custom template? Anything custom that you put into your theme/nggallery/ folder would have to be patched on an upgrade anyway right?

    That’s probably what I’ll do for now unless there’s a better way.

    Also instead of trying to put everything into shortcodes you could allow each gallery to be associated with a custom template on the admin side (like how you can choose a page).

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: NextGEN Gallery] Album template, how to set galleries template’ is closed to new replies.