Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
path segment added
- Loading branch information
Showing
14 changed files
with
142 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# You can simply include this Route in your site configuration: | ||
# imports: | ||
# - { resource: "EXT:fp_masterquiz/Configuration/Routes/Default.yaml" } | ||
routeEnhancers: | ||
QuizPlugin: | ||
type: Extbase | ||
extension: FpMasterquiz | ||
plugin: Pi1 | ||
routes: | ||
- { routePath: '/', _controller: 'FpMasterquiz::list' } | ||
- { routePath: '/quiz', _controller: 'FpMasterquiz::show' } | ||
- { routePath: '/result', _controller: 'FpMasterquiz::result' } | ||
- routePath: '/quiz/{quiz_title}' | ||
_controller: 'FpMasterquiz::show' | ||
_arguments: | ||
quiz_title: quiz | ||
- routePath: '/result/{quiz_title}' | ||
_controller: 'FpMasterquiz::result' | ||
_arguments: | ||
quiz_title: quiz | ||
defaultController: 'FpMasterquiz::list' | ||
requirements: | ||
tag_title: '^[a-z0-9].*$' | ||
aspects: | ||
quiz_title: | ||
type: PersistedAliasMapper | ||
tableName: tx_fpmasterquiz_domain_model_quiz | ||
routeFieldPattern: '^(?P<path_segment>.+)$' | ||
routeFieldResult: '{path_segment}' | ||
routeFieldName: path_segment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -264,3 +264,4 @@ FAQ | |
:glob: | ||
|
||
PageTSconfig/Index | ||
Routing/Index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
.. include:: ../../Includes.txt | ||
|
||
.. ================================================== | ||
.. FOR YOUR INFORMATION | ||
.. -------------------------------------------------- | ||
.. -*- coding: utf-8 -*- with BOM. | ||
.. ================================================== | ||
.. DEFINE SOME TEXTROLES | ||
.. -------------------------------------------------- | ||
.. role:: underline | ||
.. role:: typoscript(code) | ||
.. role:: ts(typoscript) | ||
:class: typoscript | ||
.. role:: php(code) | ||
|
||
|
||
Frontend Routing Setup | ||
^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
The extension provides a frontend route enhancer configuration that you can include | ||
in your site configuration `config/sites/mysite/config.yaml`. | ||
|
||
.. code-block:: yaml | ||
imports: | ||
- { resource: "EXT:fp_masterquiz/Configuration/Routes/Default.yaml" } | ||
Feel free to modify or enhance this configuration. | ||
|
||
Note: every quiz must have set the path segment before you can use this feature! | ||
|
||
|
||
Example | ||
~~~~~~~ | ||
|
||
You write your own frontend route configuration by adding the following to your site configuration:: | ||
|
||
routeEnhancers: | ||
QuizPlugin: | ||
type: Extbase | ||
extension: FpMasterquiz | ||
plugin: Pi1 | ||
routes: | ||
- { routePath: '/', _controller: 'FpMasterquiz::list' } | ||
- { routePath: '/umfrage', _controller: 'FpMasterquiz::show' } | ||
- routePath: '/umfrage/{quiz_title}' | ||
_controller: 'FpMasterquiz::show' | ||
_arguments: | ||
quiz_title: quiz | ||
defaultController: 'FpMasterquiz::list' | ||
requirements: | ||
tag_title: '^[a-z0-9].*$' | ||
aspects: | ||
quiz_title: | ||
type: PersistedAliasMapper | ||
tableName: tx_fpmasterquiz_domain_model_quiz | ||
routeFieldPattern: '^(?P<path_segment>.+)$' | ||
routeFieldResult: '{path_segment}' | ||
routeFieldName: path_segment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters