Hello, is anyone out there providing me the PHP code to read the content of a sp pagebuilder page into a php variable. For example as it is also possible and easy with a standard Joomla 4 article.
PHP access to sp pagebuilder page
Accepted answer
Marked as the solutionYou are welcome 😊
SP Page Builder pages can be imported as JSON format. This could give you a clue. Sorry, I do not have deep knowledge on this topic. Otherwise, I might help you.
5 more replies
Hello Alphons
Sorry, we do not provide customization support. You can use SP Page Builder for articles in Joomla. Please follow this documentation
Best regards
Hello Ofi,
thank you for your quick reply. To read a Joomla 4 article via PHP, such default PHP is available
$articleId = nn; // nn is articleID
$table_plan = JTable::getInstance('Content', 'JTable');
$table_plan_return = $table_plan->load(array('id' => $articleId));
//Access the article content:
$introtext = $table_plan->introtext;
$fulltext = $table_plan->fulltext;
Surely a similar programme code would be available for reading an SP Pagebuilder page?
I have no idea about it. Maybe you can do it. As I said, we do not provide customization request.
Hello Ofi,
That's too bad - I'm not really asking for customisation but a method to load a SP pagebuilder page into a variable via PHP. Just like that is possible for a standard J4 article :-)
Anyway - thank you very much.
Hello Ofi,
I'll see if the JSON road is an option. Thanks for the tip!
Kind regards, Alphons