$media_count is a numbered list generated from theme_settings and themename.info function aether_preprocess_page(&$variables, $hook) { $base_grid_prefix = $grid["prefix{$media_count}"]; $grid_width = $grid["width{$media_count}"]; $variables['grid_width'] = $grid_width; } page.tpl.php