dev-master
9999999-devA CMS without Admin Panel but an js overlay
MIT
The Development Requires
by Marvin Oßwald
0.1.0
0.1.0.0A CMS without Admin Panel but an js overlay
MIT
The Development Requires
by Marvin Oßwald
Wallogit.com
2017 © Pedro Peláez
A CMS without Admin Panel but an js overlay
ALPHA Things can and will break..., (*1)
'providers' = [
...
marvinosswald\OnpageCMS\Providers\OnpageCMSServiceProvider::class
]
Right now you will need to setup a few things before you can start., (*2)
Please migrate the cms table., (*3)
The frontend overlay expects to send requests as PUT to api/cms as of now this is hardcoded.
- PUT api/cms => '\marvinosswald\OnpageCMS\Controllers\CMSController@updateBlock', (*4)
I don't publish a routing for it myself so you can setup authentication as you wish for example like this:, (*5)
Route::put('api/cms',['middleware' => ['jwt.auth'], 'uses' => '\marvinosswald\OnpageCMS\Controllers\CMSController@updateBlock']);
The frontend overlay provides a login modal, therefor you need to provide a function which returns a token like {"token":"ABCYXZ"}, (*6)
The Frontend expects to get a token with a POST Request at /api/cms/login you get the following fields as payload: email,password, (*7)
You need to setup a loader script there is one included vendor/marvinosswald/OnpageCMS/resources/assets/js/opCMSLoader.js you may just want copy the content into your app.js or whatsoever because loader.uri and loader.element should be customized
- loader.element points to an id which acts as an activator for the overlay
- loader.uri must point to opCMS.js it gets copied to your public path something like public/opcms/js/opCMS.js, (*8)
For instance you need to inject the cms directive into your view like:, (*9)
@inject('cms', 'marvinosswald\OnpageCMS\Services\CMS'), (*10)
Define cms blocks in your views. There are two types of block right now:, (*11)
{!! $cms->text()->Title() !!}
Output:
``` html
### meta()
Use the function call to set the name attribute like:
``` php
{!! $cms->meta()->description() !!}
Output:
html
<meta id="cms-en-#-meta-description" class="cms-meta" name="description" content="">, (*13)
Generates a Title Tag like:
php
{!! $cms->meta()->title() !!}
Output:
html
<title id="cms-en-#-meta-title" class="cms-meta"></title>, (*14)
A CMS without Admin Panel but an js overlay
MIT
A CMS without Admin Panel but an js overlay
MIT