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

Define redraw as snippet in ajax request #193

Closed
MartkCz opened this issue Aug 5, 2019 · 2 comments
Closed

Define redraw as snippet in ajax request #193

MartkCz opened this issue Aug 5, 2019 · 2 comments

Comments

@MartkCz
Copy link
Contributor

@MartkCz MartkCz commented Aug 5, 2019

Version: 2.5.2

Component:

	public function handleSnip(int $account): void {
		$this->redrawControl('profiles');
	}

template:

{define _xxx}
	<input n:name="xxx">
{/define}

<a n:href="snip!">Ajax</a>

In normal request _xxx is not called, but in ajax request is called by SnippetDriver. Probably name is problem (when _xxx is renamed to xxx, ajax request is ok), specifically _

PS: function name in generated php file is blockXxx instead of block_xxx

@dg

This comment has been minimized.

Copy link
Member

@dg dg commented Aug 5, 2019

The problem is actually in the title, the underscore at the beginning is used internally for snippets.

@MartkCz

This comment has been minimized.

Copy link
Contributor Author

@MartkCz MartkCz commented Aug 5, 2019

So can latte throw exception if block starts with undescore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.