How to use custom macros outside a template?

6 months ago

Hoang Vuong
Member | 2

Hi all,
a have one a little trouble with extended my BasePresenter with HomePresenter. When I use:

class HomePresenter extends BasePresenter {

and this give me error message:

Class ‘BasePresenter’ not found
I try find some resolution on forum, unfortunately I haven't got lucky.
I use Nette 2.0-beta for php 5.2 with prefix.
For see all code a saved it on Is any thing wrong in auto loader for class? Or I have some bad things in code?

Thanks for helping,

6 months ago

Member | 258

BasePresenter is not part of Nette. We create this class for same logic in presenters (like creating some component in footer on every page).

You can use BasePresenter from sandbox (just remove declare…)…resenter.php

Or you can just extends Nette presenter
class HomepagePresenter extends Nette\Application\UI\Presenter