I’m stuck and I hope someone can help me out.
The challenge is how to access a page’s content form within a Shortcode-UI plugin shortcode handler?
For instance suppose I have a shortcode in markdown like:
[ui-my_custom_shortcode page="my_page_name" /]
Now this is the beginning of the class CalloutShortcode
in the file CalloutShortcode.php
:
namespace Grav\Plugin\Shortcodes;
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
class CalloutShortcode extends Shortcode
{
public function init()
{
...
From this class I would like to get to the page content of the page which name is used as the page parameter in the shortcode, in this example my_page_name
.
I am well aware there are easier and better ways to use another page’s content in a page but this is just a simplified example.
Thank you.