Skip to content

Instantly share code, notes, and snippets.

View jokumer's full-sized avatar
:octocat:
Contributing

jokumer

:octocat:
Contributing
View GitHub Profile
@jokumer
jokumer / PageContentErrorHandler.php
Last active November 24, 2021 10:57 — forked from dogawaf/PageContentErrorHandler.php
Keep redirecting old realurl urls after migrating to TYPO3 9+
<?php
namespace Site\Site\ErrorHandler;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Site\Site\Service\RealurlRedirectService;
use TYPO3\CMS\Core\Site\Entity\Site;
use TYPO3\CMS\Core\Site\Entity\SiteLanguage;
<?php
declare(strict_types=1);
namespace Vendor\Extension\ExternalImport\Transformation;
use Cobweb\ExternalImport\ImporterAwareInterface;
use Cobweb\ExternalImport\ImporterAwareTrait;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\QueryBuilder;

Example Pagination for TYPO3v10

An efficient way to use Extbase Pagination in your custom extension, inspired by blog entry from undkonsorten (in german):

https://blog.undkonsorten.com/native-pagination-in-typo3-10

Add PHP class PaginationService to your extension:

Fx \Vendor\MyExtension\Service\PaginationService

@jokumer
jokumer / Example FLUID partial for date variants.md
Last active March 16, 2020 21:05
TYPO3 - Date format for tx_news and tx_eventnews

Example FLUID partial for date variants

Using TYPO3 CMS extension news with eventnews there can be a lot of different variants of date views:

  • a day
  • a day with starttime to endtime
  • from first day to last day (full day)
  • from first day to last day with starttime to endtime (each day)
  • from first day with starttime to last day with endtime
  • ...
@jokumer
jokumer / MigrateNewsTtContentRecordsCommand.php
Last active February 14, 2019 16:30
TYPO3 - Migrate tt_news tt_content.records for tx_news
<?php
namespace Jokumer\Upgrader\Command;
use Doctrine\DBAL\DBALException;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\QueryBuilder;

Keybase proof

I hereby claim:

  • I am jokumer on github.
  • I am jokumer (https://keybase.io/jokumer) on keybase.
  • I have a public key ASBKyv1F1_T1zWWc7rJftbHFiBPg_6rXU9Zs5ve-xlH8Xwo

To claim this, I am signing this object:

@jokumer
jokumer / Example XML sitemap rendering for news with TYPO3 9.5.md
Last active September 10, 2020 12:43
TYPO3 9.5 SEO Sitemap for TxNews

Example XML sitemap rendering for news with TYPO3 9.5

To render Google compliant news sitemap with TYPO3 version 9.5 with its included SEO extension and thirdparty news extension from Georg Ringer, this example is a quick start you can embed in your own project.

It follows the recommended XML scheme from Google Google News Sitemaps

Requirements

You need to use a project or sitepackage extension in your TYPO3 installation (see also Sitepackage builder).