Change Gallery Home Page Title in Theme.php Change Gallery Home Page Title in Theme.php
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Change Gallery Home Page Title in Theme.php

Started by SolidSnake2003, February 18, 2014, 01:07:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SolidSnake2003

Is it possible to change the title of the Photo Gallery home page?

I saw the title in the english.php file in the Language file.  Is it possible to change it within the theme.php so I don't have to change it every upgrade?

http://www.solidsnakelegacy.net/gallery

roaftech

In the absence of any other reply let me put in my two-pence worth and if it's wrong somebody will correct it!

Reading your question, I conclude that you want to change the 'Home' title that appears at the beginning of the default menu. On http://www.roaf.org/gallery/ I have changed the title from "Home" to "Gallery Introduction" by adding the appropriate line of code into english_gb.php (my preferred language).
Here is the actual code:
$lang_main_menu['home_lnk'] = 'Gallery Home Page';

As I understand it, 'english.php' is the default file containing all variable labels, but any labels placed in a supplementary language file will over-ride those in the default file (provided that language is activated in the gallery config).  If you dont want to use 'english_gb' as your language then create a copy of it (eg 'my_lang.php') and retain only those labels that you want to change, then activate that as your preferred language.  Since 'my_lang.php' is not a standard file it won't get overwritten in any upgrade.

This is probably easier than trying to change it in the theme file.

HTH
.
Steve Humphreys,
Help, Hope and Co-operation,
Asociatia Neemia, Dorohoi, Romania.
www.roaf.org/gallery

ΑndrĂ©

Good solution roaftech, unfortunately it just works if your preferred language is English, i.e. it won't work if your gallery should be displayed in e.g. Spanish.

SolidSnake2003, if you want to change it in your theme.php file, copy the function theme_main_menu from themes/sample/theme.php if it doesn't exist. Then, find
'{HOME_LNK}' => $lang_main_menu['home_lnk'],
and replace it with something like
'{HOME_LNK}' => 'Gallery Home Page',

roaftech

Valid point, Andre, although I could add in mitigation that I had looked at the enquirer's site before replying.  :)
.
Steve Humphreys,
Help, Hope and Co-operation,
Asociatia Neemia, Dorohoi, Romania.
www.roaf.org/gallery

SolidSnake2003

Thanks for answering my question, marking as solved.