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 的页面 ID。我不确定的一点是如何将页面 ID 传递给插件,以便它可以显示正确的图像。
这里最好的方法/语法是什么?我在想象这样的事情:
{{ gallery:render id=this_page_id }}
其中 this_page_id 将是页面的唯一 ID。谁能指出我正确的方向?
干杯,菲尔
通过@PyroCMS Twitter 帐户提供的解决方案 -
{{ gallery:render id=page:id }}