Download the PHP package cpsit/cps-shortnr without Composer
On this page you can find all versions of the php package cpsit/cps-shortnr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cps-shortnr
cps_shortnr
Installation
- activate the extension in the Extension Manager
Configuration
- define a
configuration file
in the extension settings - adjust the
regular expression
to your needs - you should change the configuration for
pageNotFound_handling
only if really needed and you know what you do
Configuration file
Default:
cps_shortnr object
The configuration has to be wrapped in a cps_shortnr object.
decoder
Property | Data type | Description |
---|---|---|
decoder | stdWrap | The identifier for the decode process. |
encoder
Property | Data type | Description |
---|---|---|
encoder | stdWrap | The instruction how shortlinks are built. The current record is available as well as four internal fields: tx_cpsshortnr_identifier_lower (determined identifier in lower case), tx_cpsshortnr_identifier_upper (determined identifier in upper case), tx_cpsshortnr_language (either current language or language of the record if available) and tx_cpsshortnr_language_parent (either uid of the record or its language parent if available). |
Identifier configuration
The name for an identifier is free to choose. You might have to adopt the regular expression
for your needs. Please be
aware this should be a short identifier though.
source
Property | Data type | Description |
---|---|---|
record | stdWrap | The uid of the record that should be displayed. |
table | text | The table of the record that should be displayed. |
encodeMatchFields | text | Additional field => value assignment that the current record has to match for encode process. |
path
Property | Data type | Description |
---|---|---|
path | stdWrap | The new Url used for the redirect. |
Regular expression
Default:
The regular expression is used to split the incoming Url (shortlink) into different parts. These parts can be used inside
the identifier configuration
. They are stored in the TSFE->register variable with tx_cpsshortnrmatch prefix (e.g.
tx_cpsshortnr_match_1, tx_cpsshortnr_match_2).
PageNotFound_handling
For a detailed description see Install Tool > All configuration > FE > pageNotFound_handling.
TypoScript API
Example:
userFunc
Property | Data type | Description |
---|---|---|
userFunc | function name | CPSIT\CpsShortnr\Service\Shortlink->create |
record | stdWrap | The uid of the record that should be encoded. |
table | text | The table of the record that should be encoded. |