Download the PHP package darkling/nette-menu without Composer

On this page you can find all versions of the php package darkling/nette-menu. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nette-menu

Build Status Donate

Nette menu

Nette component for creating menus, breadcrumbs and sitemaps.

Requirements

Installation

Install package with composer:

Register as nette extension:

Basic usage

You can write menu links as associated multi dimensional arrays. Because of this you are able to create any structure of menus and submenus you may need.

That structure in neon config will generate two menus:

front:

admin:

Templates

This package includes 3 default templates (menu, breadcrumbs, sitemap). However only the default sitemap template should be used in real project. The other two templates should only help you in the beginning with building your own templates which will fit your's website look.

Changing templates can be done in your menu configuration:

As you can see, each menu can have different templates.

Visibility of items

It may be useful to hide some links in specific situations. For that we have the visibility option on items where you can tell on which template the link should be visible.

Mark active item via regex

Menu item can be labeled as active by a regular expression (or array of regular expressions) that is compared to the entire Presenter's name and action. You can set your regular expression via include setting.

Translations

When displaying title of link in some template, we always work with translated titles.

You have three options for translator:

Custom data

Every link can contain additional data which can be later used eg. in your custom latte templates.

Authorization

Sometimes you may want to hide some links based on custom rules, that includes for example authorization from nette.

This menu package uses custom IAuthorizator interface which you can use to write your own authorizators.

Link generator

When you want to display a link in your template it uses the ILinkGenerator interface to generate it from the data in your menu config. If you want to change the default logic (which uses link method from nette) you can just implement your custom link generator.

You can also override link generator later for some subtree of links:

Menu loader

If you want to build your menu maybe from database instead of neon config, you can do that by creating IMenuLoader class.

See the default ArrayMenuLoader how it works.

Changelog


All versions of nette-menu with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
nette/di Version ^3.0
nette/utils Version ^3.0
nette/application Version ^3.0
nette/http Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package darkling/nette-menu contains the following files

Loading the files please wait ....