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.
我们正在开发一个CMS。这将有一个模板系统,例如,如果管理员想要添加一个新闻部分,那么他将必须为该部分创建一个模板,并为每个新闻创建另一个模板,例如,/news/: int:/:title:/,但是该路线将存储在数据库中……我该怎么做?
您可以使用通用控制器作为后备路由,以便它捕获管理员可能创建的所有路由。然后该控制器继续读取适当的模板并显示数据。