NAVIGATION
With this hack, a content part are defined in the BE as the default choice in the list, the focus (selected) lies in the selection of the registered CP.
- as there are:
Docu: –
Forum: Default Content Part?
Author: K.Heermann (flip-flop) http://planmatrix.de
(17.08.2010)
CMS Version: >= 1.4
Version: V1.0
filename: * include/inc_lib/backend.functions.inc.php
This switch determines whether and which content is marked as “selected”. (If the switche is not present it is the same like ”” = off, the default state of the system is generated).
In config/phpwcms/conf.inc.php you'll enter e.g. for the cp “images = No 2”
$phpwcms['custom_cp_select'] = 2; // set selected cp no, list in "include/inc_lib/article.contenttype.inc.php" - default = '' - +KH170810
<note>See the numbers of the Content part Types.</note>
Enhancement of the file include/inc_lib/backend.functions.inc.php in function “getContentPartOptionTag” around line 454.
This code:
} else { $result .= '<option value="'.$value.'"'; if($value == $selected) { $result .= ' selected="selected"'; $GLOBALS['contentpart_temp_selected'] = $GLOBALS['temp_count']; } $result .= '>'.$text.'</option>'.LF; }
will be replaced by
} else { // ------ +KH 17.08.2010 Patch: set selected cp no if ($selected === '' AND isset($GLOBALS['phpwcms']['custom_cp_select'])) $selected = $GLOBALS['phpwcms']['custom_cp_select']; // ------ +KH end $result .= '<option value="'.$value.'"'; if($value == $selected) { $result .= ' selected="selected"'; $GLOBALS['contentpart_temp_selected'] = $GLOBALS['temp_count']; } $result .= '>'.$text.'</option>'.LF; }