简体   繁体   中英

Best way to pass the page ID to a plugin in PyroCMS?

I've developed a module which allows the user to upload images to a little gallery widget. When they upload the pics through the admin panel then can also assign which page the image appears on. This all works fine and I have a table in database referencing page IDs with image IDs. The bit I'm not sure about is how to pass the page ID to the plugin so it can display the correct images.

What would be the best approach/syntax here? I'm imagining something like this :

{{ gallery:render id=this_page_id }}

where this_page_id would be the unique ID of the page. Can anyone point me in the right direction?

Cheers, Phil

通过@PyroCMS Twitter帐户提供的解决方案-

{{ gallery:render id=page:id }}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM