Advertisement
helmutwinkelbach

Routing TYPO3 blog ext.

Jan 28th, 2022
1,852
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 7.49 KB | None | 0 0
  1. rootPageId: 1
  2. routeEnhancers:
  3.   DpnGlossary:
  4.     type: Extbase
  5.     limitToPages: 142
  6.     extension: DpnGlossary
  7.     plugin: glossary
  8.     routes:
  9.      -
  10.         routePath: '/{character}'
  11.         _controller: 'Term::list'
  12.         _arguments:
  13.           character: '@widget_0/character'
  14.       -
  15.         routePath: '/{localized_term}/{term_name}'
  16.         _controller: 'Term::show'
  17.         _arguments:
  18.           term_name: term
  19.     defaultController: 'Term::list'
  20.     defaults:
  21.       character: ''
  22.     aspects:
  23.       term_name:
  24.         type: PersistedAliasMapper
  25.         tableName: tx_dpnglossary_domain_model_term
  26.         routeFieldName: url_segment
  27.       character:
  28.         type: StaticMultiRangeMapper
  29.         ranges:
  30.          -
  31.             start: A
  32.             end: Z
  33.       localized_term:
  34.         type: LocaleModifier
  35.         default: term
  36.         localeMap:
  37.          -
  38.             locale: 'de_DE.*'
  39.   News:
  40.     type: Extbase
  41.     limitToPages:
  42.      - 1
  43.       - 3
  44.       - 6
  45.     extension: News
  46.     plugin: Pi1
  47.     routes:
  48.      -
  49.         routePath: '/page-{page}'
  50.         _controller: 'News::detail'
  51.         _arguments:
  52.           page: '@widget_0/currentPage'
  53.       -
  54.         routePath: '/{news-title}'
  55.         _controller: 'News::detail'
  56.         _arguments:
  57.           news-title: news
  58.       -
  59.         routePath: '/{category-name}'
  60.         _controller: 'News::detail'
  61.         _arguments:
  62.           category-name: overwriteDemand/categories
  63.       -
  64.         routePath: '/{tag-name}'
  65.         _controller: 'News::detail'
  66.         _arguments:
  67.           tag-name: overwriteDemand/tags
  68.     defaultController: 'News::detail'
  69.     defaults:
  70.       page: '0'
  71.     aspects:
  72.       news-title:
  73.         type: PersistedAliasMapper
  74.         tableName: tx_news_domain_model_news
  75.         routeFieldName: path_segment
  76.       page:
  77.         type: StaticRangeMapper
  78.         start: '1'
  79.         end: '100'
  80.       category-name:
  81.         type: PersistedAliasMapper
  82.         tableName: sys_category
  83.         routeFieldName: slug
  84.       tag-name:
  85.         type: PersistedAliasMapper
  86.         tableName: tx_news_domain_model_tag
  87.         routeFieldName: slug
  88.   BlogCategory:
  89.     type: Extbase
  90.     extension: Blog
  91.     plugin: Category
  92.     routes:
  93.      -
  94.         routePath: '/{category_title}'
  95.         _controller: 'Post::listPostsByCategory'
  96.         _arguments:
  97.           category_title: category
  98.       -
  99.         routePath: '/{category_title}/page-{page}'
  100.         _controller: 'Post::listPostsByCategory'
  101.         _arguments:
  102.           category_title: category
  103.           page: '@widget_0/currentPage'
  104.     defaultController: 'Post::listPostsByCategory'
  105.     requirements:
  106.       category_title: '^[a-z0-9].*$'
  107.       page: \d+
  108.     aspects:
  109.       category_title:
  110.         type: PersistedPatternMapper
  111.         tableName: sys_category
  112.         routeFieldPattern: '^(?P<slug>.+)$'
  113.         routeFieldName: slug
  114.         routeFieldResult: '{slug}'
  115.       page:
  116.         type: StaticRangeMapper
  117.         start: '1'
  118.         end: '99'
  119.   BlogTag:
  120.     type: Extbase
  121.     extension: Blog
  122.     plugin: Tag
  123.     routes:
  124.      -
  125.         routePath: '/{tag_title}'
  126.         _controller: 'Post::listPostsByTag'
  127.         _arguments:
  128.           tag_title: tag
  129.       -
  130.         routePath: '/{tag_title}/page-{page}'
  131.         _controller: 'Post::listPostsByTag'
  132.         _arguments:
  133.           tag_title: tag
  134.           page: '@widget_0/currentPage'
  135.     defaultController: 'Post::listPostsByTag'
  136.     requirements:
  137.       tag_title: '^[a-z0-9].*$'
  138.       page: \d+
  139.     aspects:
  140.       tag_title:
  141.         type: PersistedPatternMapper
  142.         tableName: tx_blog_domain_model_tag
  143.         routeFieldPattern: '^(?P<slug>.+)$'
  144.         routeFieldName: slug
  145.         routeFieldResult: '{slug}'
  146.       page:
  147.         type: StaticRangeMapper
  148.         start: '1'
  149.         end: '99'
  150.   AuthorPosts:
  151.     type: Extbase
  152.     extension: Blog
  153.     plugin: AuthorPosts
  154.     routes:
  155.      -
  156.         routePath: '/{author_title}'
  157.         _controller: 'Post::listPostsByAuthor'
  158.         _arguments:
  159.           author_title: author
  160.       -
  161.         routePath: '/{author_title}/page-{page}'
  162.         _controller: 'Post::listPostsByAuthor'
  163.         _arguments:
  164.           author_title: author
  165.           page: '@widget_0/currentPage'
  166.     defaultController: 'Post::listPostsByAuthor'
  167.     requirements:
  168.       author_title: '^[a-z0-9].*$'
  169.       page: \d+
  170.     aspects:
  171.       author_title:
  172.         type: PersistedPatternMapper
  173.         tableName: tx_blog_domain_model_author
  174.         routeFieldPattern: '^(?P<slug>.+)$'
  175.         routeFieldName: slug
  176.         routeFieldResult: '{slug}'
  177.       page:
  178.         type: StaticRangeMapper
  179.         start: '1'
  180.         end: '99'
  181.   BlogPosts:
  182.     type: Extbase
  183.     extension: Blog
  184.     plugin: Posts
  185.     routes:
  186.      -
  187.         routePath: '/page-{page}'
  188.         _controller: 'Post::listRecentPosts'
  189.         _arguments:
  190.           page: pagination/currentPage
  191.     defaultController: 'Post::listRecentPosts'
  192.     requirements:
  193.       page: \d+
  194.     aspects:
  195.       page:
  196.         type: StaticRangeMapper
  197.         start: '1'
  198.         end: '99'
  199.   BlogArchive:
  200.     type: Extbase
  201.     extension: Blog
  202.     plugin: Archive
  203.     routes:
  204.      -
  205.         routePath: '/{year}'
  206.         _controller: 'Post::listPostsByDate'
  207.         _arguments:
  208.           year: year
  209.       -
  210.         routePath: '/{year}/page-{page}'
  211.         _controller: 'Post::listPostsByDate'
  212.         _arguments:
  213.           year: year
  214.           page: 'currentPage'
  215.       -
  216.         routePath: '/{year}/{month}'
  217.         _controller: 'Post::listPostsByDate'
  218.         _arguments:
  219.           year: year
  220.           month: month
  221.       -
  222.         routePath: '/{year}/{month}/page-{page}'
  223.         _controller: 'Post::listPostsByDate'
  224.         _arguments:
  225.           year: year
  226.           month: month
  227.           page: 'currentPage'
  228.     defaultController: 'Post::listPostsByDate'
  229.     requirements:
  230.       year: '[0-9]{1,4}'
  231.       month: '[a-z]+'
  232.       page: '\d+'
  233.     aspects:
  234.       year:
  235.         type: BlogStaticDatabaseMapper
  236.         table: 'pages'
  237.         field: 'crdate_year'
  238.         groupBy: 'crdate_year'
  239.         where:
  240.           doktype: 137
  241.       month:
  242.         type: StaticValueMapper
  243.         map:
  244.           january: 1
  245.           february: 2
  246.           march: 3
  247.           april: 4
  248.           may: 5
  249.           june: 6
  250.           july: 7
  251.           august: 8
  252.           september: 9
  253.           october: 10
  254.           november: 11
  255.           december: 12
  256.         localeMap:
  257.          -
  258.             locale: 'de_.*'
  259.             map:
  260.               januar: 1
  261.               februar: 2
  262.               maerz: 3
  263.               april: 4
  264.               mai: 5
  265.               juni: 6
  266.               juli: 7
  267.               august: 8
  268.               september: 9
  269.               oktober: 10
  270.               november: 11
  271.               dezember: 12
  272.       page:
  273.         type: StaticRangeMapper
  274.         start: '1'
  275.         end: '99'
  276.   PageTypeSuffix:
  277.     type: PageType
  278.     default: .html
  279.     index: index
  280.     map:
  281.       sitemap.xml: 1533906435
  282.       yoast-snippetpreview.json: 1480321830
  283. routes:
  284.  -
  285.     route: robots.txt
  286.     type: staticText
  287.     content: "User-agent: *\r\nDisallow: /fileadmin/_temp_/\r\nDisallow: /t3lib/\r\nDisallow: /typo3/\r\nDisallow: /typo3_src/\r\nDisallow: /clear.gif\r\nAllow: /typo3/sysext/frontend/Resources/Public/*\r\nSitemap: https://www.erfurt-???.de/sitemap.xml"
  288. websiteTitle: ''
  289. imports:
  290.  -
  291.     resource: 'EXT:sf_books/Configuration/Yaml/Default.yaml'
  292.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement