KodiCMS-Kohana / cms

A new version of KodiCMS 14.0.0 with composer moved to the KodiCMS company.
https://github.com/KodiCMS/kodicms
131 stars 35 forks source link

How to render a snippet inside of layout? #357

Closed gestern closed 9 years ago

gestern commented 9 years ago

I'm want to render a snippet inside of layout. How to do that?

My steps to reproduce:

So, I had hoped to see my text ("Hello World!"), but I do not see anything. What is wrong?

gestern commented 9 years ago

The problem is gone when I'm attended "Widget location" in Widget, I've selected my snippet in "Layout block" and tapped "Rebuild block". Hmm

butschster commented 9 years ago

When you create new layout, you can go to Design -> Layouts and click "Rebuild blocks" button.

You can also place snippet to layout with code

Snippet::render('snippet-name');

https://github.com/KodiCMS-Kohana/cms/wiki/Snippets#snippetrender

gestern commented 9 years ago

Got it.