<xs:element name="requireObjectID" type="woltlab_boolean" minOccurs="0" />
<xs:element name="availableDuringOfflineMode" type="woltlab_boolean" minOccurs="0" />
<xs:element name="allowSpidersToIndex" type="woltlab_boolean" minOccurs="0" />
+ <xs:element name="excludeFromLandingPage" type="woltlab_boolean" minOccurs="0" />
<xs:element name="cssClassName" type="woltlab_varchar" minOccurs="0" />
</xs:choice>
</xs:extension>
<?xml version="1.0" encoding="UTF-8"?>
-<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/vortex/page.xsd">
+<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/tornado/page.xsd">
<import>
<!-- dynamic -->
<page identifier="com.woltlab.wcf.MembersList">
<name language="en">New Email Address Verification</name>
<hasFixedParent>1</hasFixedParent>
<parent>com.woltlab.wcf.AccountManagement</parent>
+ <excludeFromLandingPage>1</excludeFromLandingPage>
<content language="en">
<title>New Email Address Verification</title>
<name language="en">New Email Activation Code Request</name>
<hasFixedParent>1</hasFixedParent>
<parent>com.woltlab.wcf.AccountManagement</parent>
+ <excludeFromLandingPage>1</excludeFromLandingPage>
<content language="en">
<title>New Email Activation Code Request</title>
<name language="de">Anmeldung</name>
<name language="en">Login</name>
<parent>com.woltlab.wcf.AccountManagement</parent>
+ <excludeFromLandingPage>1</excludeFromLandingPage>
<content language="en">
<title>Login</title>
<name language="de">Kennwort vergessen</name>
<name language="en">Lost Password</name>
<parent>com.woltlab.wcf.AccountManagement</parent>
+ <excludeFromLandingPage>1</excludeFromLandingPage>
<content language="en">
<title>Lost Password</title>
<name language="de">Neues Kennwort</name>
<name language="en">New Password Request</name>
<parent>com.woltlab.wcf.AccountManagement</parent>
+ <excludeFromLandingPage>1</excludeFromLandingPage>
<content language="en">
<title>New Password Request</title>
<controller>wcf\form\RegisterForm</controller>
<name language="de">Registrierung</name>
<name language="en">Registration</name>
+ <excludeFromLandingPage>1</excludeFromLandingPage>
<content language="en">
<title>Registration</title>
<name language="en">Complete Registration</name>
<hasFixedParent>1</hasFixedParent>
<parent>com.woltlab.wcf.Register</parent>
+ <excludeFromLandingPage>1</excludeFromLandingPage>
<content language="en">
<title>Complete Registration</title>
<name language="en">New Activation Code Request</name>
<hasFixedParent>1</hasFixedParent>
<parent>com.woltlab.wcf.Register</parent>
+ <excludeFromLandingPage>1</excludeFromLandingPage>
<content language="en">
<title>New Activation Code Request</title>
<option value="0">{lang}wcf.global.noSelection{/lang}</option>
{foreach from=$pageNodeList item=pageNode}
- {if !$pageNode->requireObjectID}
+ {if !$pageNode->requireObjectID && !$pageNode->excludeFromLandingPage}
<option value="{@$pageNode->pageID}"{if $pageNode->pageID == $landingPageID} selected{/if} data-identifier="{@$pageNode->identifier}">{if $pageNode->getDepth() > 1}{@" "|str_repeat:($pageNode->getDepth() - 1)}{/if}{$pageNode->name}</option>
{/if}
{/foreach}
</dd>
</dl>
- {if $action != 'edit' || !$page->requireObjectID}
+ {if $action != 'edit' || (!$page->requireObjectID && !$page->excludeFromLandingPage)}
<dl>
<dt></dt>
<dd>
if (!$page->pageID) {
throw new UserInputException('landingPageID');
}
- else if ($page->requireObjectID) {
+ else if ($page->requireObjectID || $page->excludeFromLandingPage) {
throw new UserInputException('landingPageID', 'invalid');
}
}
}
}
- if ($this->page->requireObjectID) {
+ if ($this->page->requireObjectID || $this->page->excludeFromLandingPage) {
// pages that require an object id can never be set as landing page
$this->isLandingPage = 0;
}
* @property-read string $cssClassName css class name(s) of the page
* @property-read string $availableDuringOfflineMode is `1` if the page is available during offline mode, otherwise `0`
* @property-read string $allowSpidersToIndex is `1` if the page is accessible for search spiders, otherwise `0`
+ * @property-read string $excludeFromLandingPage is `1` if the page can never be set as landing page, otherwise `0`
* @property-read string $permissions comma separated list of user group permissions of which the active user needs to have at least one to access the page
* @property-read string $options comma separated list of options of which at least one needs to be enabled for the page to be accessible
*/
'hasFixedParent' => ($pageType == 'system' && !empty($data['elements']['hasFixedParent'])) ? 1 : 0,
'cssClassName' => isset($data['elements']['cssClassName']) ? $data['elements']['cssClassName'] : '',
'availableDuringOfflineMode' => (!empty($data['elements']['availableDuringOfflineMode'])) ? 1 : 0,
- 'allowSpidersToIndex' => (!empty($data['elements']['allowSpidersToIndex'])) ? 1 : 0
+ 'allowSpidersToIndex' => (!empty($data['elements']['allowSpidersToIndex'])) ? 1 : 0,
+ 'excludeFromLandingPage' => (!empty($data['elements']['excludeFromLandingPage'])) ? 1 : 0
];
}
/** @var Page $page */
if (!empty($row)) {
- // allow only updating of controller and handler, everything else would overwrite user modifications
+ // allow update of `controller`, `handler` and `excludeFromLandingPage`
+ // only, prevents user modifications form being overwritten
if (!empty($data['controller'])) {
$page = parent::import($row, [
'controller' => $data['controller'],
- 'handler' => $data['handler']
+ 'handler' => $data['handler'],
+ 'excludeFromLandingPage' => $data['excludeFromLandingPage']
]);
}
else {
cssClassName VARCHAR(255) NOT NULL DEFAULT '',
availableDuringOfflineMode TINYINT(1) NOT NULL DEFAULT 0,
allowSpidersToIndex TINYINT(1) NOT NULL DEFAULT 0,
+ excludeFromLandingPage TINYINT(1) NOT NULL DEFAULT 0,
permissions TEXT NULL,
options TEXT NULL
);