Feature #18911 » parentshortcut.patch
typo3/sysext/cms/ext_tables.php (working copy) | ||
---|---|---|
array('', 0),
|
||
array('LLL:EXT:cms/locallang_tca.xml:pages.shortcut_mode.I.1', 1),
|
||
array('LLL:EXT:cms/locallang_tca.xml:pages.shortcut_mode.I.2', 2),
|
||
array('LLL:EXT:cms/locallang_tca.xml:pages.shortcut_mode.I.3', 3),
|
||
),
|
||
'default' => '0'
|
||
)
|
typo3/sysext/cms/locallang_tca.xml (working copy) | ||
---|---|---|
<label index="pages.shortcut_mode">Shortcut mode:</label>
|
||
<label index="pages.shortcut_mode.I.1">First subpage</label>
|
||
<label index="pages.shortcut_mode.I.2">Random subpage</label>
|
||
<label index="pages.shortcut_mode.I.3">Parent page</label>
|
||
<label index="pages.content_from_pid">Show content from this page instead:</label>
|
||
<label index="pages.mount_pid">Mount Point (advanced):</label>
|
||
<label index="pages.mount_pid_ol">Substitute Mount Point (this page) with Mounted page:</label>
|
typo3/sysext/cms/tslib/class.tslib_fe.php (working copy) | ||
---|---|---|
* Get page shortcut; Finds the records pointed to by input value $SC (the shortcut value)
|
||
*
|
||
* @param integer The value of the "shortcut" field from the pages record
|
||
* @param integer The shortcut mode: 1 and 2 will select either first subpage or random subpage; the default is the page pointed to by $SC
|
||
* @param integer The shortcut mode: 1 and 2 will select either first subpage or random subpage, 3 will select the parent page; the default is the page pointed to by $SC
|
||
* @param integer The current page UID of the page which is a shortcut
|
||
* @param integer Safety feature which makes sure that the function is calling itself recursively max 20 times (since this function can find shortcuts to other shortcuts to other shortcuts...)
|
||
* @param array An array filled with previous page uids tested by the function - new page uids are evaluated against this to avoid going in circles.
|
||
... | ... | |
$c++;
|
||
}
|
||
break;
|
||
case 3:
|
||
$parent = $this->sys_page->getPage($thisUid);
|
||
$page = $this->sys_page->getPage($parent['pid']);
|
||
break;
|
||
default:
|
||
$page = $this->sys_page->getPage($idArray[0]);
|
||
break;
|