How to turn on KirbyText

I’ve got my content inside Kirby and marked it up within the Panel, but it just displays as un-formatted text. I now understand I need to turn on KirbyText, but where is this option? Can I simply switch it on for the entire site? Surely I don’t need to add it to all my templates and each time I suck in content?

The answer is here: Text formatting | Kirby CMS
There is no global option to turn on, and it just wouldn’t make sense.

Urm, this article doesn’t actually say where or how to turn on KirbyText. It states:

In addition to Markdown, Kirby automatically parses a set of handy tags in your text, whenever you use the ->kirbytext() field method to render content in your templates.

In the Panel I’ve made some text a Heading3 is this Markdown or KirbyText? Either way the text is unformatted in the browser.

How and where do I use the ->kirbytext() field method in a template?

There is no global option to turn on, and it just wouldn’t make sense.

Why would I not want it? If I want to markup content with heading and italics etc then I guess if I want to mark it up on one page, I’d want to do it on all pages? I don’t understand?

->kirbytext() is a field method which is called on a field. It doesn’t make sense to call kirbytext on any field type, because not every field contains markdown/kirbytext. E.g. date , select, tags , files … to name but a few.

So where do I put this field method? How do I make my *Headings display as headings?

The Starterkit and our documentation are full of code examples. Every single field has extensive documentation how to set it up in your blueprint and how to output its contents in your templates.

It’s just not sustainable to rewrite the complete documentation here.

You’re right. Show me where in the documentation it says how and where to turn on KirbyText. I understand it is turned on in a Template. But where and how?

I believe this is how

<?= $page->text()->kirbytext() ?>

adding kirbytext() to the PHP in the template?

Perhaps this could be included in the documentation?

Thank you so much for your time and help. I realise I’m starting from a very low level of understanding!

You add it to a template you have text to display. So if you have a blog post template for example then you would add something like:

<?= $page->text()->kirbytext() ?> 

At the point in the template, you want the text to be displayed.

As @texnixe has pointed out it is not a switch you turn on/off but a field method you use when it is appropriate.

I am certainly not an expert with this software but the documentation is very good if it’s all gibberish then you are not going to get very far, to be honest.

Thank you. The point I was trying to make is that I can’t find anywhere in the documentation where it says – for Markup or KirbyText to work, in a template, where you want CMS text to be used write this:

<?= $page->text()->kirbytext() ?> 

I really like Kirby and the support on this Forum has been amazing. But perhaps the above could be included in the Docs?

A good place to look for some inspiration is the cookbook.

Check it out here.

For example, there is a blog tutorial it shows you how to use kirbytext, here.

Most of what you will need is in the docs. Like any software/progamming language it’s all about understanding where you need to look.

Thank you.

Perhaps it would improve the documentation if the info about where and how to ‘turn on’ Markup / KirbyText was on the Text Formatting page?

Best wishes

It is though.

In addition to Markdown, Kirby automatically parses a set of handy tags in your text, whenever you use the ->kirbytext() field method to render content in your templates. Those tags make it simple to embed links, images, videos and more.

Not getting at you by any means, I was new to Kirby not so long ago, but the information is on that page. You want it to be easier for you to understand, that’s fine but the Kirby team are not going to change the docs when they don’t need to be changed. if you are not going to take the time to understand the software, look at examples and so on then that is really on you.

Hi. I didn’t understand that information. I’m sure that says more about my level of knowledge. I’m a novice on content management systems, Admin Panels, PHP and development in general.

But as a newcomer it would have helped me if the doc showed where to put the ->kirbytext() code in a template:

<?= $page->text()->kirbytext() ?>

That one small addition to the document might help others?

Anyway, I’m going to go away and re-watch the videos and read docs!

Best wishes