Skip to content

The basic idea

Thorazine edited this page Jul 22, 2017 · 8 revisions

Welcome to Hack

Hack is a content management system with a templateable page variable builder. It is built on a 3 layer system which I have not seen implemented like this before.

  • Front end templates
  • Backend templates
  • Client input

The theory behind the system is that no page is the same. And I felt that all the systems forgot that and tried to force you into place where you don't want to be. That place for me was making exceptions in the code and output to just "make it work".

Front end templates

When programming as a front ender in Laravel, or any other framework, you typically expect your variables in one place and creating output with it by requesting it (the basics). A class for a wysiwyg, a class for a link and so on. Hack will give you just that and more. Hack is built in a way that an output variable can also be a function (class) giving you easier access to builders and values that you need.

For example take the output for an image where "image" is the key for the item we need:

echo $page->image; // will result in full url with browser cache token
echo $page->image->url; // will output same as above, but without cache token
echo $page->image->has(); // will return a boolean based on existence 

Backend templates

Usually you build your CMS pages to have a certain amount of inputs that you can reuse. The problem usually is that one page is not like the other. So you make the best of it and do funky things in a wysiwig, make some things static and voila, you did it again... You made compromises.

Backend templates make sure you do not need to compromise anymore. The basic jist of it is that Hack can treat every url as a new template. And for each url you are able to create a complete new set of inputs you need for that page. But seeing you can make templates you can also group everything in a template. For instance, a user overview page is the same for every user. So Hack is smart enough to group those together for a quick overview. This way there are no more compromises and you never have to say no again and can create your pages the way you need to, flexible and without compromise.

Client input

Seeing there is an advanced rights system per site, per user and per module you can restrict your clients from altering templates and grant them access to particular modules and sites. All sites have separate templates, galleries and pages.

Obviously there is a lot more going on with this system. So be sure to checkout how easy and with little code you extend or create modules.

Clone this wiki locally