Problem with component class
- ruben_cgt
- Member | 6
Hello guys I have a little problem here
I have in the presenter declared the component like this
and I am calling the navigation in the .latte like this
the class is located in the directory
libs\Nmaster\Navigation.php
and I am getting this error Class ‘Navigation’ not found I don't see where is the error can any of you help me please
- jiri.pudil
- Nette Blogger | 1033
First of all, what version of Nette are you using? In newer versions,
widget
macro has been deprecated and it is recommended to use
control
instead:
Also, passing the arguments in constructor is not necessary, so this will suffice:
Note that the factory method has to return the created component.
As to your actual problem :) I guess it is a namespace issue. If the
Navigation
class is in a different namespace from the presenter,
you should add a use
statement for it into the presenter.
Otherwise, it might help to clear the cache (contents of
temp/cache/
).