Any English videos or screencasts?
- greeny
- Member | 405
Hi,
first of all, you should try quickstart. After quickstart, play with your application a bit, using documentation. You can also go through full documentation and try one topic after another. Good source of knowledge is also Planette, where you can find some useful (but sometimes outdated) tips and tricks.
You can always ask specific question here.
Regarding videos, I don't think there is much english tutorials, since the community is mostly czech-ish. But we are happy to know, that Nette is spreading into other countries!
- greeny
- Member | 405
Module is basically a group of presenters. There is nothing complicated.
- you can create link as
:Module:Presenter:action
- in routes, you can use named parameter
module
to define module - presenter should have
<ModuleName>Module
in namespace (depends on your mapping)
There is no more logic for modules in Nette.
- frocco
- Member | 46
I followed the docs at https://doc.nette.org/…n/presenters
- Created a fresh project.
- Under App, I created a directory AdminModule
- Under AdminModule I created a directory presenters
- Under presenters, I have a DashboardPresenter.php
namespace AdminModule;
use Nette,
App\Model;
/**
* Homepage presenter.
*/
class DashboardPresenter extends Nette\Application\UI\Presenter
{
public function renderDefault()
{
$this->template->anyVariable = 'any value';
}
public function renderShow()
{
$this->template->anyVariable = 'any value';
}
I have a link on home page:
<a n:href=“:Admin:Dashboard:show”>link for
Admin:Product:show</a>
I get this error.
Invalid link: Cannot load presenter ‘Admin:Dashboard’, class
‘App\AdminModule\Presenters\DashboardPresenter’ was not found
- Jan Endel
- Member | 1016
You have to options:
1)
change namespace of Dashboard presenter from AdminModule to
App\AdminModule\Presenters
or
2)
change your config.neon from:
application:
errorPresenter: Error
mapping:
*: App\*Module\Presenters\*Presenter
to
application:
errorPresenter: Error
mapping:
*: *Module\*Presenter