PHP access to sp pagebuilder page - Forum | JoomShaper
Solved SP Page Builder

PHP access to sp pagebuilder page

Asked by Alphons 2 years ago Last activity 2 years ago

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.

Accepted answer

Marked as the solution
Ofi Khan Staff

You 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

Ofi Khan Staff

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

Alphons Asked this
2 years ago · edited

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?

Ofi Khan Staff

I have no idea about it. Maybe you can do it. As I said, we do not provide customization request.

Alphons Asked this

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.

Alphons Asked this

Hello Ofi,

I'll see if the JSON road is an option. Thanks for the tip!

Kind regards, Alphons

Log in to reply.