Kirby 2.3.0 Beta

Woohoooo! :smile:

First thing that I’ve noticed: the link to the changelog doesn’t work on the /upcoming page:


Going to read the rest now :slight_smile:

Let’s get to testing it, then :slight_smile:, just pulled it into a current project.

:slight_smile: should be fixed now!

The changelog (and some tweets) suggest in 2.3 one can add a template engine. I’d like to play around with this and try to plug in Twig. Any pointers on how to do that on the Kirby side?

(I know enough PHP and have used the Twig library so I’m good on this side. Just wondering if the changelog/tweets meant there are some hooks provided.)

The template engine is now a component. You can create your own class based on that class and register it using kirby()->component('template', 'YourClassName').

1 Like

sigh …still praying and hoping for page sections:cry:

1 Like

i’m Happy to testing Kirby 2.3.0 BETA :smiley: !! its really Cool :blush: thanks a lot to the Team For That Beautifull Work! :slight_smile:

1 Like

What a treat! Love the new handling of thumbs and the way they are stored now. And that the generation of thumbs is not blocking anymore is pure magic. Thanks a lot!


Don’t be too sad about your favorite missing feature :slight_smile: We work on so much stuff in parallel and sometimes it’s really just important to wrap it up at some point and bundle it into a new release before moving on. The new component and registry structure will make new stuff so much easier for us and for you and I’m very confident, that we will soon have some stuff to make you happy :slight_smile:


@bastianallgeier I am really looking forward to it :grinning: !

I try this 2.3.0 beta ( on XAMPP (Apache/2.4.9 (Win32) PHP/5.4.27).

This code from

<?php if($user = $site->user()): ?>

<!-- some html -->

<?php if($avatar = $user->avatar()): ?>
          <?php echo $avatar->thumb([
                                      'width'   => 100, 
                                      'height'  => 100, 
                                      'quality' => 80
                                    ])->html() ?>
<?php endif; ?>

<!-- some html -->

<?php endif; ?>

fails with

Fatal error: Call to undefined method Media::thumb() in C:\xampp\htdocs\kirby_basic\site\snippets\active_user.php on line 10

if the loged in user has an avatar (*.jpg).


If I dump($avatar); for the user tester I get:

Media Object
    [url] =>
    [root:protected] => C:\xampp\htdocs\kirby_basic\assets\avatars\tester.png
    [filename:protected] => tester.png
    [name:protected] => tester
    [extension:protected] => png
    [content:protected] => 
    [cache:protected] => Array


Try to remove the html() method at the end. The thumb() method creates an image tag.

Without ->html() the error is the same.

How have you defined $user?

The first line of that snippet is:

<?php if($user = $site->user()): ?>

Are you sure you want to assign to a variable inside a condition? If you do that the condition will always be true, so using if(){} seems useless here (but maybe that’s a PHP trick I’m not familiar with).

Edit: sorry, I was talking nonsense. :sweat_smile:

No, it will only be true if the result of $site->user() evaluates to true.
This is also the reason why you can do this in PHP:

$a = $b = $c = 'Something';
1 Like

The thumb()method is not implemented for the Media class, but only for the file class. The user avatar, however, is an object of type Media, not of type File.

Custom fields for example work partly.
The $assets parts will not load.