Skip to content

Markup Regions: pw-optional region not removed when template file has no regions #1189

@Toutouwai

Description

@Toutouwai

Short description of the issue

This issue is similar to an earlier fixed issue: #302

pw-region elements were fixed but the same kind of fix is needed for pw-optional elements. Empty pw-optional elements still need to be removed even if a template file does not contain any region markup.

Steps to reproduce the issue

  1. Include an empty element in _main.php that has the pw-optional attribute.
  2. Do not include any region markup in the basic-page.php template file.
  3. Check the rendered source code for any basic-page and note that the empty element with the pw-optional attribute is present.

Setup/Environment

  • ProcessWire version: 3.0.153

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions