d4l-data4life / kirby3-static-site-generator

Static site generator plugin for Kirby 3+. With this plugin you can create a directory with assets, media and static html files generated from your pages. The result is an even faster site with less potential vulnerabilities.
MIT License
137 stars 7 forks source link

Routing destroy functions in panel #68

Closed Anjade closed 1 year ago

Anjade commented 2 years ago

` 'ready' => function ($kirby) {

  $lang = $kirby->language();

  $notePerPage = 2; // change later!
  $pagesCount = page('notes')->children()->listed()->count();

  $pageNumbers = intval($pagesCount/$notePerPage);
  if (($pagesCount % $notePerPage) != 0)
  {
    $pageNumbers++;
  }

  for ($i = 2; $i <= $pageNumbers; $i++)
  {
    $myRoutes[] = [
      'path' => "$lang/notes/$i",
      'route' => "notes/page:$i",
    ];
  }

  return [
      'd4l.static_site_generator.custom_routes' => $myRoutes
  ];

}`


When i use this, it destroys some functions in the panel and on the dynamic page.

jonathan-reisdorf commented 1 year ago

Duplicate of https://github.com/d4l-data4life/kirby3-static-site-generator/issues/64 Also I do not understand the issue, but it seems like you have already proceeded with your solution