:navigation-title: Examples .. include:: /Includes.rst.txt .. index:: Routing; Examples .. _routing-examples: ====================================== Collection of various routing examples ====================================== .. contents:: Table of contents .. note:: If you have additional examples and are willing to share, please create a Pull Request on Github and add it to this page. .. index:: Routing; EXT: News .. _routing-examples-news: EXT: News ========= **Prerequisites:** The plugins for *list view* and *detail view* are on separate pages. If you use the *category menu* or *tag list* plugins to filter news records, their titles (slugs) are used. **Result:** * Detail view: :samp:`https://example.org/news/detail/the-news-title` * Pagination: :samp:`https://example.org/news/page-2` * Category filter: :samp:`https://example.org/news/my-category` * Tag filter: :samp:`https://example.org/news/my-tag` .. literalinclude:: _Examples/_news.yaml :caption: config/my_site/config.yaml (excerpt) For more examples and background information see the :ref:`routing examples in the "News" manual `. .. index:: Routing; EXT: Blog .. _routing-examples-blog: EXT: Blog with custom aspect ============================ Taken from https://typo3.com routing configuration and the blog extension. Blog Archive: .. literalinclude:: _Examples/_blog_archive.yaml :caption: config/my_site/config.yaml (excerpt) Posts by Author: .. literalinclude:: _Examples/_blog_author.yaml :caption: config/my_site/config.yaml (excerpt) Category pages: .. literalinclude:: _Examples/_blog_category.yaml :caption: config/my_site/config.yaml (excerpt) Blog Feeds: .. literalinclude:: _Examples/_blog_feeds.yaml :caption: config/my_site/config.yaml (excerpt) Blog Posts: .. literalinclude:: _Examples/_blog_posts.yaml :caption: config/my_site/config.yaml (excerpt) Posts by Tag: .. literalinclude:: _Examples/_blog_tags.yaml :caption: config/my_site/config.yaml (excerpt) BlogStaticDatabaseMapper: .. literalinclude:: _Examples/_StaticDatabaseMapper.php :caption: packages/my_extension/Classes/Routing/Aspect/StaticDatabaseMapper.php .. _routing-examples-imports: Usage with imports ^^^^^^^^^^^^^^^^^^ On typo3.com we are using imports to make routing configurations easier to manage: .. literalinclude:: _Examples/_imports.yaml :caption: config/my_site/config.yaml (excerpt) .. _routing-examples-project: Full project example config =========================== Taken from an anonymous live project: .. literalinclude:: _Examples/_full.yaml :caption: config/my_site/config.yaml (excerpt) .. index:: Routing; EXT: DpnGlossary .. _routing-examples-glossary: EXT: DpnGlossary ================ **Prerequisites:** * The plugin for *list view* and *detail view* is added on one page. * The `StaticMultiRangeMapper `__ (a custom mapper) is available in the project. **Result:** * List view: :samp:`https://example.org/` * Detail view: :samp:`https://example.org//term/the-term-title` .. literalinclude:: _Examples/_glossary.yaml :caption: config/my_site/config.yaml (excerpt) Taken from dpn_glossary extension manual.