how to Custom route creation

28 days ago

TheYkk
Member | 3
+
0
-

i need router
base url http://localhost/…r/nette/www/

i want http://localhost/…te/www/ykk/2
to Ykk class show function and id parameter 2 run
i get eror Page not found. Missing template ‘D:\Program\XAMPP\htdocs\denemeler\nette\app\presenters\templates\Ykk\show.latte’. create file► search►

how i can disable template

Last edited by TheYkk (2018-11-20 15:35)

28 days ago

David Matějka
Moderator | 5702
+
0
-

Hi, according to the error message, the router is correct. why do you want to “disable template”? you don't want to show html response to a user? or what is an expected response?

28 days ago

TheYkk
Member | 3
+
0
-

David Matějka wrote:

Hi, according to the error message, the router is correct. why do you want to “disable template”? you don't want to show html response to a user? or what is an expected response?

i only show direct text or debug array like sample print_r($array);
i dont want show template

28 days ago

TheYkk
Member | 3
+
0
-

maybe I'd like to do a few things and just redirect. how do I disable template it?

28 days ago

David Matějka
Moderator | 5702
+
+1
-

there are quite many ways how to terminate presenter execution and send a response before rendering a template. You can find an overview in a doc

for you, $this->terminate() is probably the method you are looking for.

maybe I'd like to do a few things and just redirect.

redirect also terminates presenter execution