This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Atok
Atok

In Markup editor used for editing HTML of page, partials, layout, etc, which is in CMS section of the backend, there is a tab beside it called "Code". So, what for is this tab, how is it used, as I read in the documentation example that the template structure which is built up by three sections -- configuration, PHP code, and Twig markup -- can be written in one place?

daftspunky
daftspunky

Based on a template like this:

# This is generated by the UI / Components
title = "Hello world"
==
// This is "Code" tab contents
function onStart()
{
    $this['foo'] = 'bar';
}
==
<!-- This is "Markup" tab contents -->
I am markup. This foo is {{ foo }}.

Try saving a page via the CMS and look at the generated file contents.

Atok
Atok

I see! Thanks!

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.