Lordest Posted December 5, 2022 Posted December 5, 2022 When we use a block with php content from within the template, we want to send parameters to this block from the template Example; {block="postbit-user" params="$comment->author()->member_id"} here postbit-user we are using the keyed block and we need to send the member id variable as a parameter and use it as php code inside the block. How can I do it?
Jim M Posted December 5, 2022 Posted December 5, 2022 Thanks for posting! Unfortunately, this issue is beyond the scope of our technical support. 👩💻 Our technical support is happy to help you with the Invision Community platform, but we're unable to help with things like server management, theme questions and modifications. I've moved this to our Community Support area where other Invision Community owners will see it and help where they can.
Lordest Posted December 8, 2022 Author Posted December 8, 2022 Is it possible to get the current comment/post's data(id, author etc.) by using a PHP block inside postContainer template? So {block="postbit-user"} this is a line in postContainer template and I'd like to access comment data in it using PHP.
opentype Posted December 8, 2022 Posted December 8, 2022 (edited) What would the purpose of the block be? If you are in the postContainer, you could just add the PHP there or – to use a cleaner solution – call a custom theme template. Edited December 8, 2022 by opentype
Recommended Posts