Skip to content

Expected behaviour for multiple sections build over multiple layouts #320

@RobinDev

Description

@RobinDev

Example will be more explicit 👍

  • I have template files :
<!-- test.html.php -->
<?= $this->section('exampleSection')?>
<!-- test2.html.php -->
<?php $this->layout('test.html') ?>


<?= $this->start('exampleSection')?>
    From test2.html
<?= $this->stop()?>
<!-- test3.html.php -->
<?php $this->layout('test2.html') ?>


<?= $this->start('exampleSection')?>
    From test3.html
<?= $this->stop()?>

I may expect this result if I render test3.html.php :

    From test3.html

I get :

    From test2.html

When Plates was designed, what was the expected result for some kind for code ?
( I can do a PR, but I think it must be discussed about the expected behaviour, I am switching from twig to plates so I try to find some similar logical).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions