Forums

[Plugin: NextGEN Gallery] Album template, how to set galleries template (8 posts)

  1. andymacb
    Member
    Posted 8 months ago #

    When using an album in a page, you can set a template for that album but how do you set a template for the galleries within it?

  2. andymacb
    Member
    Posted 8 months ago #

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

  3. alexrabe
    Member
    Posted 8 months ago #

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

  4. andymacb
    Member
    Posted 8 months ago #

    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.

  5. forposts
    Member
    Posted 7 months ago #

    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

  6. areaunknown
    Member
    Posted 6 months ago #

    big help, works like a wet dream!

  7. periferral
    Member
    Posted 2 weeks ago #

    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

  8. alexrabe
    Member
    Posted 2 weeks ago #

    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

Reply

You must log in to post.

About this Topic