Gallery navigation hacks

Imagine you'd like to insert a custom code in Menalto Gallery2 that should show on each page. If you are looking for an additional functionality such as an extra button, you might consider placing it between the navigation buttons.

For example, imagine we'd like to place a button to submit the page's URL to social networking sites. We will use the code from

First create a backup of the file modules/core/templates/blocks/Navigator.tpl. Then open it and make the following change:


<div class="{$class}"> 
{foreach from=$order|split item="which"} 
{if $which=="next-and-last"} 
  <div class="next-and-last{if !isset($navigator.first) && 
                               !isset($navigator.back)} no-previous{/if}"> 
    {if isset($}    {* Uncomment to omit next when same as last: 
        && (!isset($navigator.last) || $ != $navigator.last.urlParams)} *}

<!-- AddThis Button BEGIN --> 
<script type="text/javascript">addthis_pub  = '
<a href="" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="" width="125" height="16" border="0" alt="" /></a><script type="text/javascript" src=""></script> 
<!-- AddThis Button END -->

  &nbsp; &nbsp; &nbsp; <!-- added for additional spacing -->

    <a href="{g->url params=$}" class="next"> 
      {g->text text="next"}{$suffix} 
      {if isset($} 
        {g->image item=$ image=$ 
                  maxSize=40 class="next"}


The text in bold is the one which you have to add after the corresponding lines. After that you will see addthis button in your navigation panel.  Please just make sure to substitute siteground with your own user at

Please make sure to clear your Gallery's template cache before checking it. (Site Admin, Performance option or System Maintenance - Delete template cach)

You need help with an application? hostlantern is specialized in hosting and supporting more than 200 scripts. Sign up for our web hosting services and let us help you with your application, 24/7!

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to reset my Gallery 3 administrative password

If you have forgotten your Gallery administrative password and want to recover it, you can use...

How to clear Menalto Gallery2’s cache?

The first thing to do when troubleshooting Menalto Gallery2's problems is to clear its cache....

Gallery cannot generate thumbnails

After you upload a picture to your Gallery, it is possible to experience problems with the...

Gallery resources.

The official Gallery website. The official Gallery documentation. The official support forum...

Initial Gallery Installation and Configuration

There are two ways you can install Gallery2 on your account: Manually, by downloading the...