How to write a website with us!

Verze:

19. 05. 2025

Zodpovědná osoba:

Dominik Šlechta

How to write a website with us!

First of all, in this article, we will talk about what, how and where I use . We'll look at the structure of the code as we write it here, and we'll also look at where exceptions can occur.

For our work we mostly use the Nette framework with the Latte templating system.

As we all know, our websites are made up of templates. By default, we have templates divided into several folders, depending on how we use them.

The templates we work with can be found in the folders:

  • WEB -> app -> presenters -> Admin
    -> Error
  • -> Front
  • -> Zeroadmin

Then we can still see the templates here:

WEB -> app -> filters -> Content

But we will mostly be interested only in the Front, partly in Content. The Front folder is then divided into:

Front -> templateParameters

-> templates (the most important for us)

-> Trait

Then we can find presenters in the Front folder, which are also important for us, but that is/will be another article.

In the Front foder, we then find the most common folder for us to use, which is the Homepage folder.

The page itself contains all the pages of the website that need to be coded separately, whether it is, for example, a contact page, or a homepage, or a service detail page.

In the templates folder, we can find other folders that are already very important for our work:

templates -> basket

-> oder

-> partials

Within the partials there are two: components and modules. Into the components folder we create latte templates, but only those that appear on all pages on the site. By default these are menu, header, footer, breadcrumb, etc. The modules folder contains everything else, anything that can appear on the site even once should have its own template and it should be in the modules folder.

You can find more about creating the templates themselves here.