Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Adding PHP code in Grav

Started by Muut Archive 12 years ago · 2 replies · 1141 views
12 years ago

Hey :)

I really love Grav CMS, and I would to add some PHP code, for some new functions : user profile management, form reading, loading data from a database, etc.

I don't want to use a traditional CMS like Wordpress : too heavy, can't do something unique without using a gas machine, security problems...

I would like to keep the Grav architecture and add PHP aside, for just what is particular for my needs. My wish is to keep a fast loading, simpleness, clean and secure website.

I've made some development studies years ago, but my level is not high enough to use a framework. I just want an easy solution for my project, that could (I hope) have some success.

For you, is it a good idea to use Grav like that ?

Thanks :)

12 years ago

This is one of the primary reasons we developed Grav. Keep the core as light-weight as possible and build powerful hooks so that it can be extended as needed via plugins.

There's really very little that can't be achieved with Grav plugins. We have been working on an admin plugin that is providing an entire UI to manage Grav. It is a very powerful plugin and is definitely the most complex of any we have written before. But the point is its still a plugin!

I strongly suggest that you create a test install of Grav, download all the plugins, and have a look at their code. Each one is relatively simple, and each you Grav in their own way, but it will give you a really thorough understanding of how flexible and powerful Grav can be.

I suggest you start off simple, and work up :)

The easiest way to install/remove plugins is via GPM. Just type bin/gpm in the console to see a list of commands.

I look forward to seeing what you come up with!

12 years ago

Hi rhukster, thanks for your answer. I'll look for the plugin system, and try to build mine for my needs (hope that can help other people) :)

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1282 9 years ago
Archive · by Muut Archive, 9 years ago
2 889 9 years ago
Archive · by Muut Archive, 9 years ago
2 4019 9 years ago
Archive · by Muut Archive, 9 years ago
1 2894 9 years ago
Archive · by Muut Archive, 9 years ago
3 1078 9 years ago