Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-12019

Allow extensions to replace template code using BLOCK

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.0-dev, 3.1.0-a1
    • Fix Version/s: 3.3.0-a1
    • Component/s: Template Engine
    • Labels:
      None

      Description

      Currently there is no way to replace template code in order to achieve what MODX files did with the replace-with and inline-replace-with commands. So it is impossible, to say, add a new class to an existing line of template code, or simply replace an entire chunk of template code with a new chunk.

      The template engine supports TWIGs block tags, using

      <!-- BLOCK foobar --><!-- ENDBLOCK -->

      which in theory would allow any template code wrapped in BLOCK tags in an extension to overwrite BLOCK tags of the same name in the core.

      2 problems:
      1. There are no BLOCK tags in the core
      2. It doesn't work: TWIGs block syntax only works in template inheritance, so it only works when a template is created using

      {% extends base... %}

      So phpBB needs a means to allow template code replacement (not just injection)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              VSE Matt Friedman
            • Votes:
              8 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: