Display Layout For Controller

Hi, I'm a newbie. I created a new controller in controllers folder and created a new layout , dispatch to this new controller. But when I run, I just receive 404 layout on this page. I try to find something wrong, but don't know what it is. Is there anything similar guide or question on forum? Please help, thank you.

Hello

By default, each controller looks for a .tpl template that can be displayed. If it doesn't find it, it shows this error.
You can prevent this by typing exit; after the actions you do in the controller.
If your dispatch=my_controller.update then the update.tpl file is searched in the appropriate directory.
If you create controller on frontend you should create template
design/themes/responsive/templates/addons/you_addons/views/your_controller/your_mode_controller.tpl
If you create controller on backend you should create template
design/bankend/templates/addons/you_addons/views/your_controller/your_mode_controller.tpl
Best regards
Robert

Hi, I'm a newbie. I created a new controller in controllers folder and created a new layout , dispatch to this new controller. But when I run, I just receive 404 layout on this page. I try to find something wrong, but don't know what it is. Is there anything similar guide or question on forum? Please help, thank you.

If the previous advice does not help you, please provide us with the full path to new files and templates

@photo-13805.jpg?_r=0 Very thanks your advice, it helps me a lot. It's correctly that I intend to create my custom addon, including controller, template, and block. With your help, I created controller and view success, but not for block.

I read documents, references some posts on forum, but still not load my block template when creating block.

Can you give me some advices?

Hello

You are welcome :)

Describe more precisely what you want to do. What block is this and what content it should have.

Best regards

Robert.

@photo-13805.jpg?_r=0 , I created controller in addon, and created block from template is ok for now. But I still don't know how to make a block, that can be confgured params in admin panel, and how variables can pass to block template independently with controller ( $block.content...., I found it pass like this). I do research for tutorial, but still not find it yet. Can you show me some advices?

Thanks a lot.

Please check my answer here

https://forum.cs-cart.com/topic/39591-how-to-create-own-custom-block-template-in-cs-cart/#entry323382

Please check my answer here

https://forum.cs-cart.com/topic/39591-how-to-create-own-custom-block-template-in-cs-cart/#entry323382

Many many thanks for your advice :D

You are welcome!

@eComLabs, @soft-solid,

How can I save profile field value with html format, and display profile value with html format on frontend?

Hello

I'm afraid that's not possible. Do you mean the profile field or the value of the profile field?

Best regards

Robert

yes, that's it. I created profile field as textarea field, turn on ceEditor with $('textarea').ceEditor();

But when save done, it ignore all html tag, just save normal text

Some code modifications are required to enable html tags for profile fields. But it is strongly not recommended due to security reasons

So you mean that profile field just save normal text by default, but I can hook this flow, but don't do this for security reasons, is it right?

So you mean that profile field just save normal text by default, but I can hook this flow, but don't do this for security reasons, is it right?

Right. Received data is filtered due to possible hacks

Thanks. May be I will find another way