Skip to content

Variables in blocks #1390

@DIDoS

Description

@DIDoS

This is:

  • a bug report
  • a feature request

Expected Behavior

Being able to create a block with an array of variables (aka foreach in templating).

In the docx "template":

Guests:
${CLONEME}
Forname: ${FORENAME}
Lastname: ${LASTNAME}
${/CLONEME}

In the code:

$templateProcessor->cloneBlock('CLONEME', [
['FORENAME' => 'John', 'LASTNAME' => 'Donut'],
['FORENAME' => 'Cat', 'LASTNAME' => 'Stefano']
]);

I want to start a discussion about this before I might implement it and send a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions