Download the PHP package heimrichhannot/contao-modal without Composer

On this page you can find all versions of the php package heimrichhannot/contao-modal. 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 contao-modal

Modal - A solid contao modal window framework

Modal provides modal elements within modal archives. It works best together with 'heimrichhannot/contao-teaser' and its teaser content elements.

Features

Setup

Install: composer require heimrichhannot/contao-modal

We recommend to disable the not used modal framework component in page layout.

Insertags

Insert-Tag Description Arguments
{{modal_url::*::*::*}} Returns the modal url (usage: <a href="{{modal_url::1::home}}">Hier klicken</a>) 1: modal id/alias, 2: jump to page id/alias, 3: auto_item id or alias
{{modal_link::*::*::*::*}} Returns the modal link 1: modal id/alias, 2: jump to page id/alias, 3: link text & title, 4: auto_item id or alias
{{modal_link_open::*::*::*}} Returns the modal link's opening tag (<a href="{{modal_url::1::home}}">). 1: modal id/alias, 2: jump to page id/alias, 3: auto_item id or alias
{{modal_link_close::*}} Returns the modal link's closing tag (</a>) -> Requires associated {{modal_link_open}} tag. 1: modal id/alias

Hooks

Name Arguments Expected return value Description
generateModalUrl $arrRow, $strParams, $strUrl $strUrl Modify the modal url.
generateModal $objTemplate, $objModel, $objConfig, $objModal void Modify the modal output.
getModalContentElement $strContent, $objElement, $objTemplate, $objModel, $objConfig, $objModal $strContent Modify the modal within content element.

Register custom modules to make usage of modal

If you want to register you list modules for example to make usage of the modal framework, you should enable by adding your module to the $GLOBALS['MODAL_MODULES']

Than you have to implement the links within you list module. The following example is taken from the newslist implementation within the modal framework:

As you can see, we attach to the parseArticles HOOK and adjust all links with ModalController::generateModalUrl() or ModalController::convertLinkToModalLink() functions.

To access the Reader entities it is necessary to link the redirect page with a modal. Add a new modal first, attach the reader modules as content element and select "link Modal" within the redirect page in the site structure and assign the previously created modal to the page.

Add custom modal framework

To extend modal with your own framework, you have add the following:

Add your own modal config

You have to register your custom modal within '$GLOBALS['TL_MODALS']'.

Add your modal template

The modal template contains the complete markup of your modal framework. Add as much as possible.

Add your modal link template

The modal link template is required by inserttags (e.g {{modal_link::*}} to provide the correct trigger markup.

Add your modal javascript logic

The modal windows are delivered asynchronous by the ModalController. You have to implement the toggle, close and ajax loading by your own.


All versions of contao-modal with dependencies

PHP Build Version
Package Version
Requires php Version ~5.4 || ~7.0 || ^8.0
contao/core-bundle Version ^3.5.1 || ~4.1
contao-community-alliance/composer-plugin Version ~2.4 || ~3.0
heimrichhannot/contao-teaser Version ~1.0
heimrichhannot/contao-ajax Version ^1.0.13
heimrichhannot/contao-haste_plus Version ~1.0
heimrichhannot/contao-be_explanation Version ~1.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 heimrichhannot/contao-modal contains the following files

Loading the files please wait ....