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

Variable existence in extended layout depends on block usage #80

Closed
janedbal opened this issue Sep 14, 2015 · 0 comments
Closed

Variable existence in extended layout depends on block usage #80

janedbal opened this issue Sep 14, 2015 · 0 comments

Comments

@janedbal
Copy link

Following example raises notice about undefined variable $var:

// view.latte
{extends './layout.latte'}
{var $var = 'ok'}


// layout.latte
{$var} // undefined variable

but this works:

// view.latte
{extends './layout.latte'}
{var $var = 'ok'}
{block #test}


// layout.latte
{$var}
{include #test}

This is very confusing behaviour. Is it possible to fix it?

matej21 added a commit to matej21/nette-latte that referenced this issue Sep 14, 2015
@dg dg closed this as completed in e563c14 Sep 18, 2015
dg added a commit that referenced this issue Sep 18, 2015
BlockMacros: fixed child template without block [fixes #80]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant