mirror of
https://github.com/jimeh/dlist.git
synced 2026-02-19 07:56:41 +00:00
added view request variable for GET or POST requests to set view in Simple template...
Icon View values: "icon", "icons", or "1". Details View values: "detail", "details", or "2". git-svn-id: file:///Users/jimeh/Desktop/dlist/trunk@29 a5845835-ea0f-0410-a762-dd0bfe9bfde8
This commit is contained in:
@@ -46,6 +46,15 @@ $config->parse(TPL_PATH.'settings.php', true, 'tpl_');
|
|||||||
//>STAGE> render
|
//>STAGE> render
|
||||||
//==========================
|
//==========================
|
||||||
|
|
||||||
|
//>Section> set_view_mode_from_url
|
||||||
|
if ( !empty($_REQUEST['view']) ) {
|
||||||
|
if ( preg_match("/icon|icons|1/i", $_REQUEST['view']) ) {
|
||||||
|
$_COOKIE['dList_simple_viewMode'] = 'icons';
|
||||||
|
} elseif ( preg_match("/detail|details|2/i", $_REQUEST['view']) ) {
|
||||||
|
$_COOKIE['dList_simple_viewMode'] = 'details';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//>Section> set_view_mode
|
//>Section> set_view_mode
|
||||||
if ( !empty($_COOKIE['dList_simple_viewMode']) && !empty($config->tpl_modes[$_COOKIE['dList_simple_viewMode']]) ) {
|
if ( !empty($_COOKIE['dList_simple_viewMode']) && !empty($config->tpl_modes[$_COOKIE['dList_simple_viewMode']]) ) {
|
||||||
$config->tpl_mode = $config->tpl_modes[$_COOKIE['dList_simple_viewMode']];
|
$config->tpl_mode = $config->tpl_modes[$_COOKIE['dList_simple_viewMode']];
|
||||||
|
|||||||
Reference in New Issue
Block a user