code: protected function renderSlots(Page $page)
      {
          $templateRenderer = $this->options['page_renderer'];
  
          // We need to render all blocks to avoid problems when a kind ok block is
          // not present on a page
          $availableBlocks = array();
          $blocks = BlockFactory::createAllBlocks();
          foreach($blocks as $block) {
              if ($block->isInternal()) {
                  continue;
              }
              $availableBlocks[$block->getType()] = JsonTools::toJson($this->options["serializer"], $block);
          }
  
          $templateRenderer->render(
              $page,
              array(
                  'available_blocks' => $availableBlocks,
              )
          );
          $slots = $templateRenderer->getSlots();
  
          $cmsBlocks = $templateRenderer->renderCmsBlocks(
              $blocks,
              $this->options["username"],
              array(
                  'available_blocks' => $availableBlocks,
              )
          );
  
          return array(
              'slots' => $slots,
              'cms_blocks' => $cmsBlocks,
              'available_blocks' => $availableBlocks,
          );
      }
docs: Renders the slots
  @param \RedKiteCms\FilesystemEntity\Page $page
  
  @return array