Created by @fvottus in Q&As
@fvottus
@fvottus

Hi, I'm kinda stupid in these things, I never worked with Nittro and I'm new to web development.

Anyways, I added the nittro js & css to my @layout.latte and when I try to click on some <a> link, it just doesn't work. It redirects to that URL but shows the old content.

I'm missing something here.

Btw. I do extend the BasePresenter to Nittro\Bridges\NittroUI\Presenter.

@jahudka
@jahudka

Hi, and did you add some snippets to your @layout.latte? Basically as a starting point you can just wrap {include #content} in {snippet content}{/snippet}. If you have one or more snippets in your layout but they aren't called content you need to call $this->setDefaultSnippets([ /* names of snippets */ ]) in your base presenter's setup() method. If that doesn't point you in the right direction you'll need to open the browser's developer console and check if there are any errors reported, and also check the network request log to see what your app is sending in response to you clicking the link - it should be JSON, not HTML.

@fvottus
@fvottus

I didn't. Thank you for response, gonna try and reply.

@fvottus
@fvottus

Thank you very much, works now! :D I guess I'm dumb for not giving attention to details.

// Edit, it works, however, forms don't work. It says "There was an error processing your request. Please try again later." It created the section though.

https://ctrlv.cz/shots/2020/03/24/Pvza.png

// Edit 2, the login & create article forms work, only create section & register forms just doesn't work.

Code: https://pastebin.com/gR66AWsW

Sign in to post a reply