Skip to content

Question about Templates #382

Open
Open
@eugene-brit

Description

@eugene-brit

Hi, guys!

I've a problem with creating templates.

At first, I've created .docx file which contains this structure:

${clone}
${name}
${phone}
${email}
${/clone}

Then, I should clone content between ${clone} and ${/clone}. I use $document->cloneBlock('clone', 3); for it but nothing happens. When I open this generated file I see the same structure.

${clone}
${name}
${phone}
${email}
${/clone}

Could you help me? What should I do to clone this block?

And one more question. Can I use variables in the cloned block more than one time, somethings like this:

$document->setValue('name#1', 'Name 1');
$document->setValue('name#2', 'Name 2');

Best regards, Eugene


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

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