Advertisement
helmutwinkelbach

routeEnhancer configurations with News and Blog ext.

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