How to get the most out of Kirby for new/beginner developers

Hey everyone.

I have relatively little experience in web develop outside a couple of units I’ve done at university all I’ve ever really done is a few lines of css here and there. I’m a fairly competent OO programmer (Java and C++) as far as students go.

I was attracted to kirby because of the fact that I didn’t really want to have to bother with a SQL database for my website. It was also recommended to me because of the way the blueprints work and how with some little code you can have a really cool website because of the way you split up Input fields for example.

I’m hoping some of you could point me to some cool features of Kirby that I should be using to get the most out of the CMS for my site.

A bit about my site:

I’m doing a site for a charity, it doesn’t need to be very complex or super detailed, just 5 main pages with some sub-pages and support for articles/maybe blogs. It’ll have a heavy focus on pictures and inphographs to eliminate clutter and reduce how much text is on the page.

As long as everything is interactive and mobile friendly I think it’s at least a good start.

Maybe the Starterkit is a good thing for you? Its really nice to start with :slight_smile:

Here it is: Kirby Starterkit

There’s also a few basic docs you might want to check out:

The most important one: the cheatsheet, whenever you need to check what methods you could probably use and which parameters they require.

Some solution post

  1. Creating Menus:
  2. Creating a Blog:

There’s also the base blog Kirby theme by @sashtown which might help when creating a blog.

1 Like

For keeping your templates DRY:

Snippets can help (they’re basically template bits that you can call from any template). For instance if your navigation needs to get all the first-level pages of the site, that’s trivial with Kirby’s API and can be written once in a snippet and called everywhere you need it. The Starterkit uses snippets for a few things, if you want an example.

You could also look at:

With that if you have somewhat complex needs for some parts of the website you can write your own PHP functions or even classes as a plugin, and use it in your controllers to pass some data to your templates.

To help working with data from your pages, if you need to transform in some way before outputting it and don’t want to do that in your templates (especially if you want to avoid duplication):

So you have a lot of different options, some better suited to specific needs but generally there’s a bit of overlap and some things (especially retrieving data or preparing data for output) can be done equally well as a utility function in a plugin, as a page method, as a Page Model, in a controller or directly in the template.

If this looks a bit complex, remember that you don’t have to use those techniques (and especially not all of them). You can always put logic in your PHP templates, or write the 2-3 functio

For working with images:

For infographics you may want to work with SVG.

To make sure the site is mobile-friendly you will need to write responsive CSS (with fluid widths and media queries, perhaps a different navigation layout on small screens, perhaps bits of JS). The starterkit has some examples of that, but you will probably need to write your own, or use a theme that is also responsive: