bramdeleeuw/silverstripe-inertia
WIP Inertia server-side adapter for SilverStripe
This module is a still Work In progress, and help/pr's would be much appreciated!
Inertia allows you to create fully client-side rendered, single-page apps, without much of the complexity that comes with modern SPAs. It does this by leveraging existing server-side frameworks.
Installation
Install the module trough composer:
composer require bramdeleeuw/silverstripe-inertia
Add $Inertia to your Page.ss layout.
$Inertia($pageJson)
This wil render the following snippet:
<div id="app" data-page="{the page data}"></div>
In your controller you can now add the following method to populate your vue/react/etc. app.
<?php
use SilverStripe\CMS\Controllers\ContentController;
use Inertia\Inertia;
class PageController extends ContentController
{
public function index()
{
return Inertia::render('Page', [
'title' => $this->Title,
'content' => $this->Content
]);
}
}
On initial request this will populate the data-page with the passed props. Following request made by Inertia will receive the passed props as json.
Maintainers
Related Packages
themonkeys/laravel-silverstripe
Integrates the Silverstripe CMS into your Laravel application
171
30
dreamfactory/installers
A multi-framework Composer library installer
47
1
agl
annotatecms
bitrix
cakephp
chef
codeigniter
concrete5
craft
croogo
dokuwiki
dolibarr
drupal
elgg
fuelphp
grav
hurad
installer
joomla
kohana
laravel
lithium
magento
mako
mediawiki
modulework
modx evo
moodle
oxid
phpbb
piwik
ppi
puppet
roundcube
shopware
silverstripe
smf
symfony
thelia
typo3
wolfcms
wordpress
zend
zikula