[英]How to get ID of current page in TYPO3
我正在使用TYPO3 v8,如何获取我在后端编辑的当前页面的ID?
You can get current PageId
like this. 你可以像这样得到当前的PageId
。
in Controller file. 在Controller文件中。
$currentPid = $GLOBALS['TSFE']->id
Using Typoscript. 使用Typoscript。
temp.page_uid = TEXT
temp.page_uid.field = uid
示例:在您的控制器中:
$id = (int)\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
This depends on context, examples: 这取决于上下文,例子:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.