docs icon indicating copy to clipboard operation
docs copied to clipboard

Latte include docs could mention `block` syntax

Open helvete opened this issue 3 years ago • 1 comments

The Latte documentation page for include tag does not mention include block syntax.

It would be beneficial if it does, as one could not use dynamic name resolution w/o the block argument.

To be specific, this for example does not work:

{include $dynamicName from './subtemplate.latte', varName: $varValue}

But this does:

{include block $dynamicName from './subtemplate.latte', varName: $varValue}

I understand the difference between these (now :-) ) - the former includes a template while the latter includes a block from a template.

I believe having the difference mentioned within the docs will improve understanding of the behaviour.

More on this topic to be found in related nette forum thread.

helvete avatar Aug 29 '22 08:08 helvete

Feel free to send PR.

dg avatar Aug 29 '22 10:08 dg

@helvete Actually, I wonder why you didn't add that to the documentation? What's the barrier?

dg avatar Oct 25 '22 12:10 dg

Hell I could have. The reason I haven't done that is that I totally forgot about this.

I can see the documentation has already been updated, so thank you!

helvete avatar Oct 27 '22 08:10 helvete