Lordest Posted December 5, 2022 Share 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? Link to comment Share on other sites More sharing options...
Jim M Posted December 5, 2022 Share 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. Link to comment Share on other sites More sharing options...
Lordest Posted December 8, 2022 Author Share Posted December 8, 2022 Does anyone know? Link to comment Share on other sites More sharing options...
Lordest Posted December 8, 2022 Author Share 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. Link to comment Share on other sites More sharing options...
opentype Posted December 8, 2022 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts