How to use custom macros outside a template?

Hoang Vuong
Member | 1

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,

Member | 310

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