<dt></dt>
<dd>
<label><input type="checkbox" name="originIsNotSystem" value="1"{if $originIsNotSystem} checked{/if}> {lang}wcf.acp.page.originIsNotSystem{/lang}</label>
+ <label><input type="checkbox" name="controllerCustomURL" value="1"{if $controllerCustomURL} checked{/if}> {lang}wcf.acp.page.customURL{/lang}</label>
</dd>
</dl>
{if $applicationPackageID}{capture append=linkParameters}&applicationPackageID={@$applicationPackageID}{/capture}{/if}
{if $pageType}{capture append=linkParameters}&pageType={@$pageType|rawurlencode}{/capture}{/if}
{if $originIsNotSystem}{capture append=linkParameters}&originIsNotSystem=1{/capture}{/if}
+ {if $controllerCustomURL}{capture append=linkParameters}&controllerCustomURL=1{/capture}{/if}
{pages print=true assign=pagesLinks controller="PageList" link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder$linkParameters"}
{/content}
<td class="columnTitle columnName">{if $page->isLandingPage}<span class="icon icon16 fa-home jsTooltip" title="{lang}wcf.acp.page.isLandingPage{/lang}"></span> {/if}<a href="{link controller='PageEdit' id=$page->pageID}{/link}">{$page->name}</a></td>
<td class="columnText columnURL">
{$page->getDisplayLink()}
+ {if $page->controllerCustomURL}
+ <span class="icon icon16 fa-exclamation-circle blue jsTooltip" title="{lang}wcf.acp.page.customURL{/lang}"></span>
+ {/if}
</td>
<td class="columnText columnPageType">{lang}wcf.acp.page.type.{@$page->pageType}{/lang}</td>
<td class="columnDate columnLastUpdateTime">{@$page->lastUpdateTime|time}</td>
*/
public $originIsNotSystem = 0;
+ /**
+ * filters the list of pages showing only pages with custom urls
+ * @var boolean
+ */
+ public $controllerCustomURL = 0;
+
/**
* @inheritDoc
*/
if (!empty($_REQUEST['pageType'])) $this->pageType = $_REQUEST['pageType'];
if (!empty($_REQUEST['showPageAddDialog'])) $this->showPageAddDialog = 1;
if (!empty($_REQUEST['originIsNotSystem'])) $this->originIsNotSystem = 1;
+ if (!empty($_REQUEST['controllerCustomURL'])) $this->controllerCustomURL = 1;
// get available applications
$applicationList = new ApplicationList();
if ($this->originIsNotSystem) {
$this->objectList->getConditionBuilder()->add('page.originIsSystem = ?', [0]);
}
+ if ($this->controllerCustomURL) {
+ $this->objectList->getConditionBuilder()->add("page.controllerCustomURL <> ''");
+ }
}
/**
'availableApplications' => $this->availableApplications,
'availableLanguages' => LanguageFactory::getInstance()->getLanguages(),
'showPageAddDialog' => $this->showPageAddDialog,
- 'originIsNotSystem' => $this->originIsNotSystem
+ 'originIsNotSystem' => $this->originIsNotSystem,
+ 'controllerCustomURL' => $this->controllerCustomURL
]);
}
}
* @return string
*/
public function getDisplayLink() {
- return preg_replace('~^https?://~', '', $this->getLink());
+ $link = preg_replace('~^https?://~', '', $this->getLink());
+ if ($this->controllerCustomURL) {
+ $link = preg_replace('~(index\.php\?)[^/]+/$~', "\$1{$this->controllerCustomURL}/", $link);
+ }
+
+ if (URL_OMIT_INDEX_PHP) {
+ $link = str_replace('index.php?', '', $link);
+ }
+
+ return $link;
}
/**