Section

<!-- Error rendering component -->
<!-- TwigException: Unable to parse '=> "data-#{k}=#{v}")|join(' ') ~ ' ' : ''' at template position71 -->
<!-- Error: TwigException: Unable to parse '=> "data-#{k}=#{v}")|join(' ') ~ ' ' : ''' at template position71
    at /builds/michaelhulsman/footballrs.net/htdocs/content/themes/footballrs.net/node_modules/@frctl/twig/src/adapter.js:156:24
    at new Promise (<anonymous>)
    at TwigAdapter.render (/builds/michaelhulsman/footballrs.net/htdocs/content/themes/footballrs.net/node_modules/@frctl/twig/src/adapter.js:134:16)
    at ComponentSource._renderVariant (/builds/michaelhulsman/footballrs.net/htdocs/content/themes/footballrs.net/node_modules/@frctl/fractal/src/api/components/source.js:212:30)
    at _renderVariant.next (<anonymous>)
    at onFulfilled (/builds/michaelhulsman/footballrs.net/htdocs/content/themes/footballrs.net/node_modules/co/index.js:65:19) -->
{% set additionalData = additionalData is defined and additionalData != '' ? additionalData|map((v,k) => "data-#{k}=#{v}")|join(' ') ~ ' ' : '' %}
{% if isBackend == true or hidden is not defined or hidden != true %}
    {% if isBackend %}
        <script>document.body.dispatchEvent(new Event('block-added'))</script>
        <div {{ additionalData }}class="headline headline--m border z-10 border-black border-dashed px-1 py-1 bg-black bg-opacity-40 cursor-pointer">({{ currentBlockName }})</div>
    {% endif %}
    <section {{ additionalData }}class="{{ className }}">
        {% block content %}
            No contents
        {% endblock %}
    </section>
{% endif %}
/* No context defined. */
  • Content:
    <?php
    
    namespace Theme\Views\Atoms\section;
    
    
    use ACFToolkit\FieldClasses\Group;
    use ACFToolkit\FieldClasses\Select;
    use ACFToolkit\Types\CustomAtom;
    use Theme\Views\Atoms\separator\Separator;
    
    class Section extends CustomAtom
    {
        public string $name = 'section';
        public string $label = 'Section';
        public int $needsJs = 0;
        public int $needsVue = 0;
        public int $needsVueInitialisation = 0;
    
        public function __construct($name = '', $title = '', $children = [])
        {
            parent::__construct($name, $title);
            $this->addChildren(array_merge($children, [
                ...(Separator::getInstance('separator', 'Separator'))->getChildren(),
            ]));
        }
    }
    
  • URL: /components/raw/section/Section.php
  • Filesystem Path: resources/Views/Atoms/section/Section.php
  • Size: 686 Bytes
  • Content:
    <?php
    
    namespace Theme\Views\Atoms\section;
    
    use ACFToolkit\ViewModels\BaseViewModel;
    
    class SectionViewModel extends BaseViewModel
    {
        public function background_color()
        {
            return $this->data['section_config']['background_color'] ?? 'bg-white';
        }
    }
    
  • URL: /components/raw/section/SectionViewModel.php
  • Filesystem Path: resources/Views/Atoms/section/SectionViewModel.php
  • Size: 267 Bytes

No notes defined.