Skip to content

Template Editor: Persistence — Save reordered PHP blocks back to template file #528

@nielsdrost7

Description

@nielsdrost7

Sub-task extracted from #130 during consolidation into #145.

Parent: #145

A Save function must collect the PHP code strings in their new order and write them back into the corresponding sections of the server-side template file (e.g., default.php).

Backend requirements:

  • Read the current PHP template file (e.g., default.php).
  • Identify and isolate the specific PHP code blocks within the defined zones (#client, #company).
  • Receive the newly ordered list of PHP strings from the front end.
  • Replace the old, ordered set of PHP code blocks in the file with the new, reordered set.

This will likely require careful use of regular expressions or a robust file manipulation utility on the server to avoid corrupting the non-movable surrounding PHP/HTML code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions