ZenphotoCMS Forum
Exclude an album from keyboardnav-extended - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Exclude an album from keyboardnav-extended (/thread-13693.html)



Exclude an album from keyboardnav-extended - ctdlg - 2022-02-04

Hello,

I try to exclude keyboard navigation from a specific album using keyboardnav-extended.php extension.

I did a copy of my album.php (themes folder) and named it albumnokeybnav.php.
I assigned my album to this template.

Line 107, keyboardnav-extended.php file,
If I add
&& $_zp_gallery_page != 'album.php'
It's ok, but all albums are excluded

If I add
&& $_zp_gallery_page != 'albumnokeybnav.php'
does not exclude my album using this template : nav keys do work

I also tried adding
&& $albumname != 'my album'
nav keys do work

I also tried using
$_zp_current_album
without success.

What could be the right code is a mystery for me.




Exclude an album from keyboardnav-extended - acrylian - 2022-02-04

You need to use $_zp_current_album->name The name of your album is the folder name include parent albums:
https://www.zenphoto.org/news/zenphotos-object-model-framework/




Exclude an album from keyboardnav-extended - ctdlg - 2022-02-07

Hello,

Using $_zp_current_album->name (including parent albums) does work.
Thank you !