Download the PHP package netresearch/contexts without Composer

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

Latest version License PHPStan PHPCodeSniffer CodeQL

Multi-channel contexts

Show and hide pages and content elements based on configurable "contexts". With the use of contexts, TYPO3 is able to do multichannel output.

Examples for contexts:

Apart from the context rules, this extension also provides an API to use contexts in your own extensions.

Setup

  1. Install and activate extension contexts
  2. Clear TYPO3 cache

Optional: Install extensions contexts_geolocation for location-based context rules (continent, country, area) and contexts_wurfl for device-based rules (type check: phone, tablet, TV, ...; screen sizes, device/browser type).

Creating and using contexts

Creating a context

  1. Log into the TYPO3 backend as administrator
  2. Goto Web/List view, root page (ID 0)
  3. Create a new record: TYPO3 contexts -> Context

    • Give it a title, e.g. "Affiliate ID: foo"
    • Select a type: "GET parameter"
    • GET parameter name: affID
    • Parameter value: foo
    • Activate "Store result in user session"
    • Save and close

Using a context

  1. Goto Web/Page, select a page
  2. Edit a content element
  3. Select the "Contexts" tab
  4. For Context "Affiliate ID: foo", select "Visible: yes"
  5. Save

View the page. The content element is not visible.

Now add ?affID=foo to the URL and load it. The content element will be visible now.

You can visit other pages now. When you come back, the content element will still be visible - even though the GET parameter is not in the URL anymore - because "Store result in user session" had been activated.

Context types

The contexts extension ships with a number of simple contexts. All of them get stored in table tx_contexts_contexts.

Domain

A domain context matches when the domain the user visits is in the configured list.

This is helpful if the site is available on several domains, or when it is deployed on development/stage/live systems - you may choose to show a content element on the development system only.

Domain matching

You may use one domain per line.

When the domain does not begin with a dot, it will only match fully: www.example.org will not match the configured domain example.org.

It is possible to use a dot in front of the domain name. In this case, all subdomains will match: some.www.example.org matches the configured domain .example.org.

GET parameter

Checks if a GET parameter is available and has a certain value.

Activate "Store result in user session" to keep the context when navigating between pages.

When leaving the parameter values field empty, any non-empty parameter value will activate the context.

IP address

Matches the user's IP address. IPv4 and IPv6 are supported.

Supported notations:

HTTP header

Checks if an HTTP header is available and has a certain value.

Activate "Store result in user session" to keep the context when navigating between pages.

When leaving the parameter values field empty, any non-empty parameter value will activate the context.

Logical context combination

Combines other contexts with logical operators.

Contexts are referenced via their alias and can be combined with the following signs:

Session variable

This context checks if a session variable with the given name is set (is not NULL).

Fluid template implementation

The implementation of a context query in fluid templates looks like::

TypoScript implementation

The implementation of a context query in TypoScript looks like::

Testing


All versions of contexts with dependencies

PHP Build Version
Package Version
Requires ext-pdo Version *
typo3/cms-core Version ^11.5
typo3/cms-frontend Version ^11.5
typo3/cms-backend Version ^11.5
typo3/cms-extbase Version ^11.5
typo3/cms-extensionmanager Version ^11.5
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 netresearch/contexts contains the following files

Loading the files please wait ....