Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clone Block more times #598

Closed
fishwolf opened this issue Aug 21, 2015 · 1 comment
Closed

Clone Block more times #598

fishwolf opened this issue Aug 21, 2015 · 1 comment

Comments

@fishwolf
Copy link

cloneBlock method doesn't work if i run more times.

[code]
$templateProcessor->setValue('Planet', htmlspecialchars('Venus'));
$templateProcessor->cloneBlock('CLONEME', 1);

$templateProcessor->setValue('Planet', htmlspecialchars('Mercury'));
$templateProcessor->cloneBlock('CLONEME', 1);

$templateProcessor->setValue('Planet', htmlspecialchars('Venus'));
$templateProcessor->cloneBlock('CLONEME', 1);

OR

$templateProcessor->cloneBlock('CLONEME', 3);

$templateProcessor->setValue('Planet#1', htmlspecialchars('Venus'));
$templateProcessor->setValue('Planet#2', htmlspecialchars('Mercury'));
$templateProcessor->setValue('Planet#3', htmlspecialchars('Venus'));

[/code]

template23

@Gadeoli
Copy link

Gadeoli commented Aug 13, 2019

Today has someway to do that (some kind of mult clone block)?
v.0.16.0

$templateProcessor->setValue('Planet', htmlspecialchars('Venus'));
$templateProcessor->cloneBlock('CLONEME', 1);

$templateProcessor->setValue('Planet', htmlspecialchars('Mercury'));
$templateProcessor->cloneBlock('CLONEME', 1);

$templateProcessor->setValue('Planet', htmlspecialchars('Venus'));
$templateProcessor->cloneBlock('CLONEME', 1);
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants