Download the PHP package sourcebroker/singleview without Composer

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

TYPO3 Extension singleview #############################

local:

What does it do?

This extension allows to display single view on different page than list view and still keep urls user and SEO friendly.

Look at example below for better understanding.

Lets take following list view url:

https://www.example.com/list/

TYPO3 default is that when you put single view on different page then there is no easy way to remove it from slugified url. You will get something like below (single view is on separate page named "detail"):

https://www.example.com/list/detail/title-of-single-item/

If you will use ext:singleview then you can put single view on different page than list view but the slugified url will still look nice like below - so no /detail/ part.

https://www.example.com/list/title-of-single-item/

Installation

Use composer:

composer require sourcebroker/singleview

Usage

Each configuration of the ext:singleview settings has to be registered in your ext_localconf.php file using \SourceBroker\Singleview\Service\SingleViewService::registerConfig() static method as in example below (for ext:news)

<?php

\SourceBroker\Singleview\Service\SingleViewService::registerConfig(
    1,
    2,
    function() {
        $newsParams = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('tx_news_pi1');
        return !empty($newsParams['news']);
    },
    ['backend_layout'],
);

Parameters of registerConfig() method:

1) First param is PID of the list view page.

2) Second param is PID of the single view page.

3) Third param is closure which returns boolean (or boolean value as a condition) which needs to be met to show single page on list view page. Closure is good here because at ext_localconf.php level the url/slug is not decoded yet so the value of \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('tx_news_pi1') is empty. But at the place the closure is executed the \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('tx_news_pi1') will return good value.

4) Fourth param is optional and its array of strings with names of the fields which will be copied from single page to list page. If you use backend_layouts for managing your layouts then probably you should put there ['backend_layout']

IMPORTANT!

Single view links should point to the same page uid as list view.

Technical background

The idea behind is to use TYPO3 build in feature "Show content from pid" which you can find in page properties. In this extension value for "Show content from pid" field is set dynamically based on $_GET parameter. When TYPO3 renders page with list view then ext:singleview checks if $_GET parameter has single view request. If this is true then it sets "content_from_pid" field with value of single view page uid. This way single view page with its content and layout is shown on list view page.

To be sure that TYPO3 will not use one cache for list view and single view a "content_from_pid" is added to hashBase. You can deactivate this behaviour by setting: $GLOBALS['TYPO3_CONF_VARS']['EXT']['EXTCONF']['singleview']['hashBaseCustomization']['enabled'] = false;

Changelog

See https://github.com/sourcebroker/singleview/blob/master/CHANGELOG.rst


All versions of singleview with dependencies

PHP Build Version
Package Version
Requires typo3/cms-core Version ~10.4.0 || ~11.5.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 sourcebroker/singleview contains the following files

Loading the files please wait ....