Skip to content

Conversation

@matej21
Copy link
Contributor

@matej21 matej21 commented Sep 2, 2014

@matej21
Copy link
Contributor Author

matej21 commented Sep 2, 2014

But there is an inconsistency I don't like (It was NOT introduced by this commit)
compiled template may look like this:

if (empty($_l->extends) && !empty($_control->snippetMode) && empty($_g->includingBlock)) {
    return Nette\Bridges\ApplicationLatte\UIMacros::renderSnippets($_control, $_b, get_defined_vars());
}

// !!!!! including blocks...

<?php if ($_l->extends) { ob_end_clean(); return $template->renderChildTemplate($_l->extends, get_defined_vars()); }
call_user_func(reset($_b->blocks['content']), $_b, get_defined_vars()) ; 

so in snippet mode, if template has no layout, blocks won't be included at all.

@dg dg force-pushed the master branch 3 times, most recently from d4f8f8f to b9ada7c Compare September 5, 2014 21:41
@dg dg force-pushed the master branch 2 times, most recently from ab57645 to 3386bd1 Compare January 27, 2015 12:27
@dg dg force-pushed the master branch 3 times, most recently from b7c910a to 3f30cee Compare February 6, 2015 13:20
@dg dg force-pushed the master branch 2 times, most recently from b9d4eb3 to 8ca92c7 Compare February 10, 2015 03:54
@matej21
Copy link
Contributor Author

matej21 commented Apr 22, 2015

ping @dg

@dg
Copy link
Member

dg commented Apr 22, 2015

Is it BC break?

@dg dg force-pushed the master branch 6 times, most recently from 6074ad2 to 81a1a34 Compare May 25, 2015 10:49
@dg dg force-pushed the master branch 6 times, most recently from 51b53ed to d36f845 Compare June 21, 2015 14:21
@dg dg force-pushed the master branch 2 times, most recently from 5f21b0d to 0c73a68 Compare July 1, 2015 14:55
@dg dg force-pushed the master branch 5 times, most recently from 8e097dc to e4eb640 Compare October 2, 2015 14:25
@dg dg force-pushed the master branch 2 times, most recently from 7f051bf to f87df33 Compare December 3, 2015 04:09
@dg dg force-pushed the master branch 2 times, most recently from 9725b1d to 9869e52 Compare January 13, 2016 18:03
@dg dg force-pushed the master branch 4 times, most recently from 18f376d to 3fe619f Compare January 22, 2016 03:07
@dg dg force-pushed the master branch 2 times, most recently from 20a93ca to 08cbdeb Compare February 8, 2016 13:39
@dg
Copy link
Member

dg commented Mar 18, 2016

@matej21 please can you rebase it, I'll merge it

@matej21 matej21 force-pushed the fix/snippets_includeblock branch 4 times, most recently from 4dec1e8 to 606249b Compare March 20, 2016 16:18
@matej21 matej21 force-pushed the fix/snippets_includeblock branch from 606249b to 29c5be3 Compare March 20, 2016 16:22
@matej21
Copy link
Contributor Author

matej21 commented Mar 20, 2016

rebased (it is failing because the test depends on nette/latte#34)

Is it BC break?

I hope it is not :)

@dg
Copy link
Member

dg commented Mar 20, 2016

Thanks

dg added a commit that referenced this pull request Mar 20, 2016
Snippets: do not render snippets from template which is included using includeblock macro
@dg dg merged commit 461ec69 into nette:master Mar 20, 2016
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

Successfully merging this pull request may close these issues.

block defined in includeblock template included in snippet doesn't exist for ajax redrawing

2 participants