Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要按页面 ID(或 PageModel 对象)访问自定义部分,但我找不到获取 FrontendTemplate 的方法。我想在下拉导航中使用它来回显悬停(父)页面的自定义部分。
如果有人会搜索,答案是:
<?php $articles = \ArticleModel::findPublishedByPidAndColumn($id, $column_name); echo static::getArticle($articles[0]); // for ex. the first article ?>