Please note that this documentation is for the most recent version of this extension. It may not be relevant for older versions. Related documentation can be found in the documentation directory of the extension.
Human readable URLs
Slug configuration (TYPO3 9.5 upwards)
routeEnhancers:
PageTypeSuffix:
type: PageType
map:
openimmo.json: 1508582933
OpenimmoImmobiliePlugin:
type: Extbase
limitToPages:
# Page uid of list/search-page and show/detail-page
- 395
- 593
- 508
extension: Openimmo
plugin: Immobilie
routes:
- routePath: '/{immobilie_slug}'
_controller: 'Immobilie::show'
_arguments:
immobilie_slug: immobilie
-
routePath: '/'
_controller: 'Immobilie::search'
-
routePath: '/{immobilie_search}'
_controller: 'Immobilie::search'
_arguments:
immobilie_search: search
defaultController: 'Immobilie::search'
defaults:
immobilie_search: ''
requirements:
immobilie_search: 'restore'
aspects:
immobilie_slug:
type: PersistedAliasMapper
tableName: tx_openimmo_domain_model_immobilie
routeFieldName: slug
routeValuePrefix: /
fallbackValue: '0' # Fallback on `immobilie.uid = 0` to have a proper 404-handling in our controller!
OpenimmoRequestPlugin:
type: Extbase
limitToPages:
# Page uid of the request-page
- 396
extension: Openimmo
plugin: Request
routes:
- routePath: '/{immobilie_slug}'
_controller: 'Immobilie::request'
_arguments:
immobilie_slug: immobilie
defaultController: 'Immobilie::request'
aspects:
immobilie_slug:
type: PersistedAliasMapper
tableName: tx_openimmo_domain_model_immobilie
routeFieldName: slug
routeValuePrefix: /
Configure the search list and details page separately
With the configuration above, problems can occur with the immobilie_search=restore parameter. For example, if the user wants to jump back from the details page to the search list, a immobilie_search=restore parameter ensures that the last search is restored. This means the correct pagination page is selected, and the last viewed property is highlighted, if applicable.
If the parameter "immobilie_search=restore" is included in the URL (e.g., https://typo3-12-13.openimmo13.ddev.site/list/filtered-list/restore), the routing interprets this as displaying the property with the slug "restore" in the single view. To counteract this, the configuration can be split, and the "OpenimmoImmobiliePlugin" section can be replaced.
OpenimmoImmobilieShowPlugin:
type: Extbase
limitToPages:
# Page uids for detail pages
- 246
- 6
extension: Openimmo
plugin: Immobilie
routes:
-
routePath: '/{immobilie_slug}'
_controller: 'Immobilie::show'
_arguments:
immobilie_slug: immobilie
aspects:
immobilie_slug:
type: PersistedAliasMapper
tableName: tx_openimmo_domain_model_immobilie
routeFieldName: slug
routeValuePrefix: /
fallbackValue: '0'
OpenimmoImmobilieSearchPlugin:
type: Extbase
limitToPages:
# Page uids for search pages
- 64
extension: Openimmo
plugin: Immobilie
routes:
-
routePath: /
_controller: 'Immobilie::search'
-
routePath: '/{immobilie_search}'
_controller: 'Immobilie::search'
_arguments:
immobilie_search: search
defaultController: 'Immobilie::search'
defaults:
immobilie_search: ''
requirements:
immobilie_search: restore
Realurl configuration
$configuration = [
'postVarSets' => array(
'_DEFAULT' => array(
// EXT:openimmo start
'zeige' => array(
array(
'GETvar' => 'tx_openimmo_immobilie[controller]',
'valueMap' => array(
'generator' => 'Pdf',
),
'noMatch' => 'bypass',
),
array(
'GETvar' => 'tx_openimmo_immobilie[action]',
'valueMap' => array(
'details' => 'show',
),
'noMatch' => 'bypass',
),
array(
'GETvar' => 'tx_openimmo_immobilie[immobilie]',
'lookUpTable' => array(
'table' => 'tx_openimmo_domain_model_immobilie',
'id_field' => 'uid',
'alias_field' => 'CONCAT(objektnr_extern,\'_\',objekttitel)',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
array(
'GETvar' => 'tx_openimmo_immobilie[createPdf]',
'valueMap' => array(
'pdf' => '1',
),
'noMatch' => 'bypass',
),
),
'stellen' => array(
array(
'GETvar' => 'tx_openimmo_request[controller]',
'valueMap' => array(
//'uebersicht' => 'Reference',
),
'noMatch' => 'bypass',
),
array(
'GETvar' => 'tx_openimmo_request[action]',
'valueMap' => array(
//'details' => 'show',
),
'noMatch' => 'bypass',
),
array(
'GETvar' => 'tx_openimmo_request[immobilie]',
'lookUpTable' => array(
'table' => 'tx_openimmo_domain_model_immobilie',
'id_field' => 'uid',
'alias_field' => 'CONCAT(objektnr_extern,\'_\',objekttitel)',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
),
// EXT:openimmo end
),
),
'fixedPostVars' => array(
'immobilieDetailConfiguration' => array(
array(
'GETvar' => 'tx_openimmo_immobilie[action]',
'valueMap' => array(
'show' => '',
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_openimmo_immobilie[immobilie]',
'lookUpTable' => array(
'table' => 'tx_openimmo_domain_model_immobilie',
'id_field' => 'uid',
'alias_field' => 'CONCAT(objektnr_extern, \'_\', objekttitel)',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
array (
'GETvar' => 'tx_openimmo_immobilie[createPdf]',
'valueMap' => array (
'pdf' => '1',
),
'noMatch' => 'bypass'
)
),
'395' => 'immobilieDetailConfiguration',
),
];
