Topic: Variables and constants

I have many questions:

1) "Theme chunks" accept php code, but content blocks/chunks doesn´t, right?

2) How do I echo some system constant in a Theme Chunk? Like "MONSTRA"? echo constant("MONSTRA"); doesn´t work...

3) If I declare and set one variable in a theme chunk, how do I read it from the index template?
example ("setter" chunk sets $variable = "abc"):

my index template goes:

<?php Chunk::get('setter'); ?>
<?php Chunk::get('header'); ?>
<div class="container-wide">

    <div class="container">

        <div class="row">
            <div class="col-xs-12">
            global $variable;
            echo $variable;


Re: Variables and constants

1) True, I think, but let me clarify.  I think 'Chunks' are deprecated and no longer used. There are 'Snippets' and 'Blocks'.  Snippets can have PHP or JS in them. Blocks are for HTML or text.

2) echoing those constants is as easy as

<?php echo MONSTRA; ?>


<?php echo THEMES_SITE; ?>

3) In this case, I'd probably use a Snippet or Block. Doing so would keep data in the database and out of the template.

Re: Variables and constants

Thank you.
I will try.