Logo

element()

ops...

Description

Gets a specified file and appends it as if a part of the site. Note you dont have to add the file extension.

Usage: element(string $elementPath, array $data, array $options = []) echo $this->element('elementName') <?= $this->element('elementName') ?> <?= $this->element('slider-icons', ['icon' => $image]) ?> <!-- stuff.php --> <p>Stuff</p> <!-- home.php --> <p>Home</p> <?= $this->element('stuff') ?> Outputs: <p>Home</p> <p>Stuff</p>