G2-rc1: remove default rows, cols, perpage
kbarr
Joined: 2005-08-29
Posts: 11 |
Posted: Mon, 2005-08-29 19:03 |
in album.tpl, {foreach from=$theme.children item=child} For my customized theme, I would like to display ALL thumbnails on the album page and let the user scroll down as necessary. Also, I'm using float:left; so the concept of rows and columns is gone. How do I prevent a default rows/cols/perPage from being imposed on my album? What's the cleanest way? Here's what I've tried: 1. removing 'rows','columns','perPage' arguments from the call to setStandardSettings() 2. Inspired by siriux's code, placing this stanza above and below the call to loadCommonTemplateData if (isset($theme['params']['rows'])) { unset($theme['params']['rows']); } if (isset($theme['params']['columns'])) { unset($theme['params']['columns']); } if (isset($theme['params']['perPage'])) { unset($theme['params']['perPage']); }
It seemed to work for one album |
|
Posts: 8601
#1 is correct.. it didn't work because you still have settings for rows, cols etc in the db.
You can clean these out and clear cache, or just rename your theme..
Posts: 11
Thanks for your quick response. Unfortunately, I tried clearing the template and database cache and running db optimization: (all from the site admin / maintenance menu). no change. Did you say I needed to clear something from the mysql database first? Where are the rows/cols stored?
I tried copying the theme to a new directory, doing a s/matrix/kbarr/, but no luck. I re-ran the cache delete steps, and still no change.
I even tried deleting and recreating a new album with the new "kbarr" template. Same issue.
Posts: 8601
g2_PluginParameterMap.. look for rows with g_pluginId = {yourtheme} to find the rows/columns settings.
when you moved the theme to a new directory it sounds like you changed the classname and setId lines in theme.inc. you then had to install and activate this theme and select it as your default theme or assign an album to use it.. at this point you still didn't see all child items? check your g2_PluginParameterMap table and make sure there are no rows/columns/perPage for this theme.
Posts: 11
thanks, when I renamed it didn't make me install/activate, so I guess it didn't refresh the db correctly.
I ran these commands, cleared the cache, and all is well. Thanks!