Member
Member
marcov   2010-12-06, 05:56
#1

Is there any way to override the ZP admin albums/images per page values in an individual theme?

I am trying to override the number of album thumbs and image thumbs per page by using the following in my index.php and albums.php files, respectively using the following code at the top of my files:

[code]

[/code]
and
[code]

[code]

They seem to have no effect, I still get the number of thumbs as set in the ZP admin theme options.

I also tried placing the same code in the themeoptions.php file, still no effect.

Also tried to set the defaul options in the themeoptions.php ThemeOptions() function - it still does not work.

[code]
setOptionDefault('albums_per_page', 12); setOptionDefault('images_per_page', 12);
[/code]

Member
Member
micheall   2010-12-06, 08:51
#2

Which version of zenphoto are you using? Also which theme? Some themes (in older versions of zenphoto) use the normalizecolumns option at the beginning of the theme's index page.

Administrator
Administrator
acrylian   2010-12-06, 11:26
#3

setOptionDefault() is the wrong function, you should use setOption(). Note that it has a extra parameter to either set the value permanently or temporarily. You can do this with all options. See the documentation for that.

Member
Member
marcov   2010-12-06, 15:06
#4

I am using the normalizeColumns functions in the theme - is it no longer needed?

I am using the latest version and with a theme I am working on. The setOption function worked out.

Administrator
Administrator
acrylian   2010-12-06, 16:15
#5

normalizeCOlumns is currently needed but will not be needed anymore with the coming 1.3.2.

Member
Member
sbillard   2010-12-06, 21:20
#6

Please note that breadcrumbs will not work unless the theme is consistent in its #per page settings. Practically this means that if you are setting it not permanant you need to do so in each and every page involved with breadcrumbs.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.