1
votes

I am newbie to laravel. Acoording to the requirement i have been given to use octobercms theme with laravel. I have successfully installed octobercms & its theme - FlatUI. As for this theme, the doc says that its non-functional. So all the html templates are static. And I have to make it functional. So I started from the very first thing and that is registration & login. But I am confused where to write the logic of controller and so on or how to save in the database.

So can anyone help me to out of this problem?

1

1 Answers

2
votes

To make items functional you will need to install respective plugins or write a plugin with the logic inside. OcotberCMS plugins contain the controllers, models and components.

These components can be placed on CMS pages and use whatever functionality that has been written in the logic.

So for example, registration and login it is best to use the official octobercms User plugin. It deals with user Auth and is packed with features. You will then integrate this into whatever theme by adding components to your pages.

https://octobercms.com/plugin/rainlab-user

Using the plugin

Now this plugin contains registration and login out of the box. These are found in the 'Components' of the plugin. In the backend, create the page you wish to use for user login and then add the necessary component.

Changing the default look of the forms

As you can notice, the plugin uses its own views for rendering the html. Found in /components/account/default.htm. You can change this file and modify although the best way is to create a partial in your theme directory with the structure

partials/account/default.htm

Copy the markup from the plugins default.htm file and edit the markup to your tastes.

When you add a component to a page. It will be embedded as

{% component 'componentName' %}

So you can now replace that with

{% partial 'account/default.htm' %}

Now your own layout will be used with that plugin. So any future updates won't override your custom layout. So for converting static themes you can take that themes markup for the standard login page and integrate it with the User plugin.

Extending Plugins

Now as for extending features, it is quite simple. Watch this tutorial for best practices when doing so.

https://vimeo.com/108040919

Also check out

https://octobercms.com/plugin/rainlab-userplus

Then once installed. You can browse the plugins/rainlab/userplus folder and see how it is constructed.

Don't forget to also watch the introduction to OctoberCMS to visually see how everything works with eachother.

https://vimeo.com/79963873